pandas groupby mean of one column code example Example: pandas groupby mean df.groupby(['A', 'B']).mean()