Advertisement
Guest User

zerowka

a guest
Jun 16th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. import pandas as pd
  2. import matplotlib.pyplot as plt
  3.  
  4. data = pd.read_csv("usa.csv", sep=",")
  5. grupa = data.groupby(['Kandydat']).agg({'Głosy elektorskie':['sum']})
  6. wykres = grupa.plot.pie(subplots=True, autopct='%1.1f%%', fontsize=15, figsize=(6, 6))
  7. plt.title('Wybory na prezydenta USA - 2016')
  8. plt.xlabel("Nr indeksu")
  9. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement