Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Pandas Pivot_Table sort order for the newly formed columns created by Pivot(ing)

My requirement could be explained in the following steps:

  1. Created a Pivot_table by pivoting 'Geo' column from a Pandas dataframe
  2. As a result of pivoting, the new colums came up well in the resultset as North AMERICA EUROPE OCEANSIA etc
  3. Now would like to sort the resultset above based on the EUROPE values alone, and Based on the All values (if margin=True option while pivot_table is created)

Comments