Average cups sold per item

pandas · from GroupBy: split, apply, combine

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

Putting the kettle on…

Starting up…

Exercise 2

Average cups sold per item.

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