1grouped_multiple = df.groupby(['Team', 'Pos']).agg({'Age': ['mean', 'min', 'max']})
2grouped_multiple.columns = ['age_mean', 'age_min', 'age_max']
3grouped_multiple = grouped_multiple.reset_index()
4print(grouped_multiple)
5
1In [8]: grouped = df.groupby('A')
2
3In [9]: grouped = df.groupby(['A', 'B'])
4