groupby aggregate multiple columns code example
Example 1: python groupby sum single columns
df.groupby(['A','C'], as_index=False)['B'].sum()
Example 2: python - gropuby based on 2 variabels
df.groupby(['col5', 'col2']).size()
df.groupby(['A','C'], as_index=False)['B'].sum()
df.groupby(['col5', 'col2']).size()