vertical aggregation in python code example
Example: mode with group by in python
df.groupby(['ITEM', 'CATEGORY']).apply(pd.DataFrame.mode).reset_index(drop=True)
df.groupby(['ITEM', 'CATEGORY']).apply(pd.DataFrame.mode).reset_index(drop=True)