group by with multiple aggregration pandas code example Example: python - gropuby based on 2 variabels df.groupby(['col5', 'col2']).size()