Een histogram maken

Introductie tot Data Science in Python

Hillary Green-Lerman

Lead Data Scientist, Looker

De ontvoerder opsporen

Introductie tot Data Science in Python

Wat is een histogram?

Introductie tot Data Science in Python

Histograms met matplotlib

plt.hist(gravel.mass)

plt.show()

Introductie tot Data Science in Python

Bins aanpassen

plt.hist(data, bins=nbins)
plt.hist(gravel.mass, bins=40)

Introductie tot Data Science in Python

Bereik aanpassen

plt.hist(data,
         range=(xmin, xmax))
plt.hist(gravel.mass,
         range=(50, 100))

Introductie tot Data Science in Python

Normaliseren

Ongenormaliseerde staafdiagram

plt.hist(male_weight)
plt.hist(female_weight)

Som van staafoppervlakte = 1

plt.hist(male_weight, density=True)
plt.hist(female_weight, density=True)

Introductie tot Data Science in Python

Laten we oefenen!

Introductie tot Data Science in Python

Preparing Video For Download...