My pandas DataFrame looks something like this:
---------------------------------------
Name | Stats
---------------------------------------
Bob | { age : 42, profession: IT }
Jill | { age : 35, profession: Engineer }
Patric | { age : 37, profession: Student }
---------------------------------------
Where Stats
is a class and age
and profession
are both properties on that class.
I'd like to sort that table by one of the properties on Stats
. For example, sort it by the person's age so that the table looks like:
---------------------------------------
Name | Stats
---------------------------------------
Jill | { age : 35, profession: Engineer }
Patric | { age : 37, profession: Student }
Bob | { age : 42, profession: IT }
---------------------------------------
Is there a way to do that with Pandas? I've only found ways to sort by the entire column
Thanks