Skip to content

Instantly share code, notes, and snippets.

@kfiresmith
Created June 2, 2021 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kfiresmith/96494918852e97c55b586389f4074b91 to your computer and use it in GitHub Desktop.
Save kfiresmith/96494918852e97c55b586389f4074b91 to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
import pandas as pd
from matplotlib.pyplot import pie, axis, show
df = pd.read_csv('syntheticdata.csv')
# show the csv: print(df.head())
sums = df.groupby(df["category"])["capacity-tb"].sum()
axis('equal');
pie(sums, labels=sums.index, autopct='%.0f%%');
show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment