Skip to content
RED SAGSkills
easy5 pts · first answer countspythonpandasgroupby

Turning a groupby result into a table

totals = df.groupby("city")["sales"].sum() returns a Series with city as the index. How do you get a DataFrame with city and sales columns?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions