Total revenue per city

pandas · from GroupBy: split, apply, combine

df.groupby().sum().mean().size().agg()as_index=False.reset_index()

Putting the kettle on…

Starting up…

Exercise 1

Total revenue per city.

your answer
stuck? the lesson behind it
GroupBy: split, apply, combine
The three motions hiding inside every .groupby() call.