sorting - pandas groupby sort descending order -


pandas groupby default sort. i'd change sort order. how can this?

i'm guessing can't apply sort method returned groupby object.

do groupby, , use reset_index() make dataframe. sort.

grouped = df.groupby('mygroups').sum().reset_index() grouped.sort_values('mygroups', ascending=false) 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -