MulaiMulai sekarang secara gratis

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.

Latihan ini adalah bagian dari kursus

Intermediate Data Visualization with Seaborn

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# 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 dan Jalankan Kode