Création d'un histogramme

Introduction à la Data Science en Python

Hillary Green-Lerman

Lead Data Scientist, Looker

Recherche du ravisseur

Introduction à la Data Science en Python

Qu'est-ce qu'un histogramme ?

Introduction à la Data Science en Python

Histogrammes avec matplotlib

plt.hist(gravel.mass)

plt.show()

Introduction à la Data Science en Python

Changement des catégories

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

Introduction à la Data Science en Python

Changement de plage

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

Introduction à la Data Science en Python

Normalisation

Graphique à barres non normalisé

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

Somme de l'aire des barres = 1

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

Introduction à la Data Science en Python

Passons à la pratique !

Introduction à la Data Science en Python

Preparing Video For Download...