Get startedGet started for free

Genre by market

A view of your sales data that covers movie_genre performance in each theater_location has been created for you as genre_market_totals. Feel free to use the .head() method to explore it in your console.

This table is a great opportunity to use the hue parameter of sns.barplot() to investigate the performance of each movie genre across each market, or theater_location.

This exercise is part of the course

Python for Spreadsheet Users

View Course

Exercise instructions

  • Create a bar plot of genre_market_totals with theater_location on the x-axis, revenue on the y-axis, and hue broken down by movie_genre.
  • Add the title Genre Performance by Market, as well as the x- and y-axis labels as Market and Revenue (USD), respectively.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Create barplot
sns.barplot(x=____, y=____, hue=____, data=____)

# Add labels
plt.____('Genre Performance by Market')
plt.____('Market')
plt.____('Revenue (USD)')

plt.show()
Edit and Run Code