CodePudding user response:
I guess you can just do : data = data.groupby(..)
CodePudding user response:
As you can see in pandas groupby docs the method returns a GroupBy Object
; so in order to store it, you have to give it to a variable:
df_grouped = df.groupby(.....)