Group orders by city and item and return the total cups — a Series with a Multi…

pandas · from MultiIndex, stack and unstack

MultiIndex.unstack().stack().xs()swaplevelget_level_values

Putting the kettle on…

Starting up…

Exercise 1

Group orders by city and item and return the total cups — a Series with a MultiIndex.

your answer
stuck? the lesson behind it
MultiIndex, stack and unstack
An index whose labels are tuples — and two methods for moving levels sideways.