Session Ready
Exercise

What do seniors like?

Let's use what we've learned so far to create a summary table, sort for a specific subset of that table, sort the values, and print the most important results. We'll use these techniques to answer the question "what movies do seniors like best?"

Note that in this exercise, we'll group by a list directly in the .groupby() method, as opposed to the video exercise, where we first assigned a list to a variable.

Instructions
100 XP
  • Group by movie_title and ticket_type to create movies_by_ticket_type.
  • Filter for where ticket_type is senior to create senior_ticket_movies.
  • Sort by ticket_quantity in descending order to create ordered_senior_movies.
  • Print the first 3 rows of ordered_senior_movies to the console.