1. Learn
  2. /
  3. Courses
  4. /
  5. Python for Spreadsheet Users

Connected

Exercise

Movie genre performance by location

Using our new techniques, we can now create more useful tables to inform our analyses.

For our sales data, we can condense our 1,000+ rows of transactions down to a few handfuls of rows to answer questions like "what genres do well in each market?" or "what movies do seniors like best?"

Let's answer the question about genres first!

Instructions

100 XP
  • Create a list that contains column names theater_location and movie_genre and assign it to a variable groups.
  • Use .groupby() and .sum() with the proper arguments to create the by_location_genre summary table.
  • Print by_location_genre to the console.