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.
Deze oefening maakt deel uit van de cursus
Intermediate Data Visualization with Seaborn
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# 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()