LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Intermediate Data Visualization with Seaborn

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# 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()
Code bearbeiten und ausführen