Facebook
From Emir Kaan, 2 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 48
  1. import pandas as pd
  2. import matplotlib.pyplot as plt
  3.  
  4. data = pd.read_csv('autompg.csv',index_col=8)
  5.  
  6. df= data[['origin','cyl']]
  7.  
  8. #### ├ťlkelerin Silindir Say─▒s─▒ Histogramlar─▒
  9.  
  10. usa = df[df.loc[:,"origin"] == "US"]
  11. asia = df[df.loc[:,"origin"] == "Asia"]
  12. eu = df[df.loc[:,"origin"] == "Europe"]
  13.  
  14. plt.hist(usa["cyl"], bins=10, label="usa", alpha=0.5)
  15. plt.hist(asia["cyl"], bins=10, label="asia", alpha=0.5)
  16. plt.hist(eu["cyl"], bins=10, label="eu", alpha=0.5)
  17. plt.show()
  18.  
  19.