Een staafdiagram maken

Introductie tot Data Science in Python

Hillary Green-Lerman

Lead Data Scientist, Looker

Dierendiefstallen vergelijken

precinct pets_abducted
Farmburg 10
Cityville 15
Suburbia 9
plt.bar(df.precinct,
        df.pets_abducted)

plt.ylabel('Pet Abductions')
plt.show()

Introductie tot Data Science in Python

Horizontale staafdiagrammen

plt.barh(df.precinct,
        df.pets_abducted)

plt.ylabel('Pet Abductions')
plt.show()

Introductie tot Data Science in Python

Foutbalken toevoegen

plt.bar(df.precinct, df.pet_abductions,
        yerr=df.error)

plt.ylabel('Pet Abductions')
plt.show()

Introductie tot Data Science in Python

Gestapelde staafdiagrammen

Introductie tot Data Science in Python

Gestapelde staafdiagrammen

Introductie tot Data Science in Python

Gestapelde staafdiagrammen

Introductie tot Data Science in Python

Gestapelde staafdiagrammen

plt.bar(df.precinct, df.dog,
        label='Dog')

plt.bar(df.precinct, df.cat,
        bottom=df.dog,
        label='Cat')

plt.legend()
plt.show()

Introductie tot Data Science in Python

Laten we oefenen!

Introductie tot Data Science in Python

Preparing Video For Download...