less than 1 minute read

Group by a category, count the totals, and sort descending df.groupby('col1', as_index = False).size().sort_values(ascending=False) lemurs.groupby('taxon', as_index = False).size().sort_values(by='size',ascending=False)

Tags:

Categories:

Updated: