group by spesific column and list other columns pandas code example Example: python - gropuby based on 2 variabels df.groupby(['col5', 'col2']).size()