The following code results in the following output \
mean = df.groupby("Group").mean()
How can I make so the 'Group' column is part of the data frame rather than a simple index aka
CodePudding user response:
you can use the parameter "as_index" in the groupby function
mean = df.groupby("Group", as_index = False).mean()