Return a per-city summary with total_cups (sum of cups) and n_orders (count), s…

pandas · from Capstone: an analysis, end to end

mergegroupbyaggpivot_tablesort_valuesvalidate=

Putting the kettle on…

Starting up…

Exercise 3

Return a per-city summary with total_cups (sum of cups) and n_orders (count), sorted by total_cups descending. Deduplicate first.

your answer
stuck? the lesson behind it
Capstone: an analysis, end to end
From a messy table to a ranked report — and the two joins that could ruin it.