Return a Series giving each row's cups as a fraction of its city's total — same…

pandas · from agg, transform and apply

.agg().transform().filter().apply()named aggregationas_index

Putting the kettle on…

Starting up…

Exercise 2

Return a Series giving each row's cups as a fraction of its city's total — same length as orders.

your answer
stuck? the lesson behind it
agg, transform and apply
Told apart by one thing: the shape of what comes back.