Now the average rating per city and item, with city down the side

pandas · from pivot_table and crosstab

pivot_tableindex/columns/valuesaggfuncfill_valuemarginscrosstab

Putting the kettle on…

Starting up…

Exercise 3

Now the average rating per city and item, with city down the side.

your answer
stuck? the lesson behind it
pivot_table and crosstab
The same aggregation, with the second key across the top instead of down the side.