Issue
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
Solution
you can use the parameter "as_index" in the groupby function
mean = df.groupby("Group", as_index = False).mean()
Answered By - Arnau
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.