Answers for "count and group by multiple columns withour passing attribute in group by"

0

pandas group by multiple columns and count

df.groupby(['col1', 'col2']).size() 
   .sort_values(ascending=False) 
   .reset_index(name='count')
Posted by: Guest on May-01-2021

Code answers related to "count and group by multiple columns withour passing attribute in group by"

Python Answers by Framework

Browse Popular Code Answers by Language