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

Modifying histograms

Let's explore how changes to keyword parameters in a histogram can change the output. Recall that:

  • range sets the minimum and maximum datapoints that we will include in our histogram.
  • bins sets the number of points in our histogram.

We'll be exploring the weights of various puppies from the DataFrame puppies. matplotlib has been loaded under the alias plt.

Bu egzersiz

Introduction to Data Science in Python

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

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Create a histogram of the column weight from the DataFrame puppies
____(____.____)

# Add labels
plt.xlabel('Puppy Weight (lbs)')
plt.ylabel('Number of Puppies')

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