Session Ready
Exercise

Creating heatmaps

A heatmap is a common matrix plot that can be used to graphically summarize the relationship between two variables. For this exercise, we will start by looking at guests of the Daily Show from 1999 - 2015 and see how the occupations of the guests have changed over time.

The data includes the date of each guest appearance as well as their occupation. For the first exercise, we need to get the data into the right format for Seaborn's heatmap function to correctly plot the data. All of the data has already been read into the df variable.

Instructions
100 XP
  • Use pandas' crosstab() function to build a table of visits by Group and Year.
  • Print the pd_crosstab DataFrame.
  • Plot the data using Seaborn's heatmap().