For example, there is a DataFrame named df. And I group it by column 'A' and column 'B',then get the mean value of column 'C'. I use the following code:
df = df.groupby(['A','B'])['C'].mean()
df = df.to_frame()
But finally I want to get a new DataFrame with 3 columns('A','B','C').How can I do after these code?