human
Python Pandas : group by in group by and average?
assistant
Here is some code to do group by on `cluster` column in `df` and get its mean

df.groupby(['cluster']).mean()

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.