Çubuk grafiği oluşturma

Python ile Veri Bilimine Giriş

Hillary Green-Lerman

Lead Data Scientist, Looker

Evcil hayvan suçlarını karşılaştırma

karakol kaçırılan_evcil
Farmburg 10
Cityville 15
Suburbia 9
plt.bar(df.precinct,
        df.pets_abducted)

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

Python ile Veri Bilimine Giriş

Yatay çubuk grafikler

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

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

Python ile Veri Bilimine Giriş

Hata çubukları ekleme

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

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

Python ile Veri Bilimine Giriş

Yığılmış çubuk grafikler

Python ile Veri Bilimine Giriş

Yığılmış çubuk grafikler

Python ile Veri Bilimine Giriş

Yığılmış çubuk grafikler

Python ile Veri Bilimine Giriş

Yığılmış çubuk grafikler

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

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

plt.legend()
plt.show()

Python ile Veri Bilimine Giriş

Hadi pratik yapalım!

Python ile Veri Bilimine Giriş

Preparing Video For Download...