how to find mean of grouped data in pandas python code example Example: pandas groupby mean df.groupby(['A', 'B']).mean()