Additional pairplots
This exercise will go through a couple of more examples of how the
pairplot() can be customized for quickly analyzing data and determining
areas of interest that might be worthy of additional analysis.
One area of customization that is useful is to explicitly define
the x_vars and y_vars that you wish to examine. Instead of examining
all pairwise relationships, this capability allows you to look only at the specific
interactions that may be of interest.
We have already looked at using kind to control the types of plots. We can
also use diag_kind to control the types of plots shown on the diagonals.
In the final example, we will include a regression and kde plot in the pairplot.
Diese Übung ist Teil des Kurses
Intermediate Data Visualization with Seaborn
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Build a pairplot with different x and y variables
sns.___(data=df,
___=["fatal_collisions_speeding", "fatal_collisions_alc"],
___=['premiums', 'insurance_losses'],
kind='scatter',
hue='Region',
___='husl')
plt.show()
plt.clf()