how to perform groupby mean and std in pandas code example Example: pandas groupby mean df.groupby(['A', 'B']).mean()