Skip to content
Advertisement

How to order dictionary based column?

I have a column that contains dictionary like below

JavaScript

I need to write a Python code to sort each element in a column based on a value such as output will be like

JavaScript

Can someone help with that please?

I tried sorted function but it breaks at some point.

Thank you!

Advertisement

Answer

I assume that Column_1 is a list:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement