group by value and count multiple columns andas code example
Example: pandas group by multiple columns and count
df.groupby(['col1', 'col2']).size()
.sort_values(ascending=False)
.reset_index(name='count')
df.groupby(['col1', 'col2']).size()
.sort_values(ascending=False)
.reset_index(name='count')