BaşlayınÜcretsiz Başlayın

Explore customer product purchase dataset

You have explored the customer by product purchase dataset in the video exercise and are now ready to plot some exploratory charts to understand the distribution of the variables and relationships between them. Here, you will explore the wholesale dataset and plot the pairwise relationships as well as the estimated distributions for each variable with the pairplot function from the seaborn library. It's an important step to explore the distribution types, and the relationships between the variables to inform the need for further data preprocessing.

The pandas library is loaded as pd, seaborn as sns, and matplotlib.pyplot as plt. Also, the wholesale dataset has been loaded as a pandas DataFrame.

Bu egzersiz

Machine Learning for Marketing in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Print the header of the wholesale dataset
  • Plot the pairwise relationships between the variables
  • Display the chart.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Print the header of the `wholesale` dataset
print(___.head())

# Plot the pairwise relationships between the variables
sns.pairplot(___, diag_kind='kde')

# Display the chart
plt.___()
Kodu Düzenle ve Çalıştır