human
Pandas DataFrame Groupby two columns and get counts
assistant
Here is some code to get count of rows in each series grouped by column 'col5' and column 'col2' of dataframe `df`

df.groupby(['col5', 'col2']).size().groupby(level=1).max()

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.