Chapter4 PDF
Chapter4 PDF
I N T R O D U C T I O N TO D ATA S C I E N C E I N P Y T H O N
Hillary Green-Lerman
Lead Data Scientist, Looker
Mapping Cell Phone Signals
plt.show()
Hillary Green-Lerman
Lead Data Scientist, Looker
Comparing pet crimes
precinct pets_abducted plt.bar(df.precinct,
df.pets_abducted)
Farmburg 10
plt.ylabel('Pet Abductions')
Cityville 15 plt.show()
Suburbia 9
plt.ylabel('Pet Abductions')
plt.show()
plt.ylabel('Pet Abductions')
plt.show()
plt.bar(df.precinct, df.cat,
bottom=df.dog,
label='Cat')
plt.legend()
plt.show()
Hillary Green-Lerman
Lead Data Scientist, Looker
Tracking down the kidnapper
plt.show()
plt.hist(gravel.mass, bins=40)
plt.hist(gravel.mass,
range=(50, 100))
Hillary Green-Lerman
Lead Data Scientist, Looker
You did it!
Positional arguments
Keyword arguments
credit_reports[
credit_report.suspect ==
'Freddy Frequentist']
plt.hist() visualizes
distributions