Advertisement
Kozobars

`medium

Dec 2nd, 2019
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import pandas as pd
  2. import matplotlib.pyplot as plt
  3.  
  4. auto = pd.read_csv('/datasets/auto.csv')
  5. auto['total'] = auto['october'] + auto['november'] + auto['december']
  6. total_segments = auto['total'].sum() + 53148 + 44067
  7. premium = 53148 / total_segments
  8. bus = 44067 / total_segments
  9. medium = auto['total'].sum() / total_segments
  10.  
  11. data = pd.Series({'Премиум': premium, 'Грузовики и др.': bus, 'Медиум':medium})
  12. data.plot(kind='bar')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement