How many rows are in each city group
pandas · from GroupBy: split, apply, combine
df.groupby().sum().mean().size().agg()as_index=False.reset_index()Putting the kettle on…
Starting up…
Exercise 3
How many rows are in each city group? Return a Series of counts.
your answer
stuck? the lesson behind it
GroupBy: split, apply, combine
The three motions hiding inside every .groupby() call.