Introduction to Data Science in Python
Hillary Green-Lerman
Lead Data Scientist, Looker
precinct | pets_abducted |
---|---|
Farmburg | 10 |
Cityville | 15 |
Suburbia | 9 |
plt.bar(df.precinct,
df.pets_abducted)
plt.ylabel('Pet Abductions')
plt.show()
plt.barh(df.precinct,
df.pets_abducted)
plt.ylabel('Pet Abductions')
plt.show()
plt.bar(df.precinct, df.pet_abductions,
yerr=df.error)
plt.ylabel('Pet Abductions')
plt.show()
plt.bar(df.precinct, df.dog,
label='Dog')
plt.bar(df.precinct, df.cat,
bottom=df.dog,
label='Cat')
plt.legend()
plt.show()
Introduction to Data Science in Python