Visualize missingness
In the previous exercise, you calculated the number of missing values and the percentage of missingness for each column. However, this is usually not enough and preference is to visualize them graphically.
You'll use the misssingno
package which is built for visualizing missing values. The airquality
DataFrame has already been imported, and the pandas
library as pd
.
You will visualize the missingness by plotting a bar chart and a nullity matrix of the missing values.
Note that we've used a proprietary display()
function instead of plt.show()
to make it easier for you to view the output.
This exercise is part of the course
Dealing with Missing Data in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Import missingno as msno
import missingno as msno
# Plot amount of missingness
msno.___(___)
# Display bar chart of missing values
display("/usr/local/share/datasets/bar_chart.png")