find average of a column in pandas groupby code example Example: pandas groupby mean df.groupby(['A', 'B']).mean()