mean group by column row value pandas code example Example: pandas groupby mean df.groupby(['A', 'B']).mean()