Get startedGet started for free

Building a PairGrid

When exploring a dataset, one of the earliest tasks is exploring the relationship between pairs of variables. This step is normally a precursor to additional investigation.

Seaborn supports this pair-wise analysis using the PairGrid. In this exercise, we will look at the Car Insurance Premium data we analyzed in Chapter 1. All data is available in the df variable.

This exercise is part of the course

Intermediate Data Visualization with Seaborn

View Course

Hands-on interactive exercise

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

# Create a PairGrid with a scatter plot for fatal_collisions and premiums
g = sns.___(df, ___=["fatal_collisions", "premiums"])
g2 = g.___(sns.scatterplot)

plt.show()
plt.clf()
Edit and Run Code