Created
September 5, 2017 10:31
-
-
Save anirudhpillai/be6da678a04102929f846b5fbefe2a2d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas | |
import matplotlib | |
import matplotlib.pyplot as plt | |
from matplotlib.backends.backend_pdf import PdfPages | |
matplotlib.style.use('ggplot') | |
df = pandas.read_excel('results.xls') | |
df.set_index("Candidate Number", inplace=True) | |
df['Overall'] = df.mean(axis=1) | |
# print(df.head()) | |
pp = PdfPages('results.pdf') | |
for col in df: | |
figure = df[col].plot( | |
bins=list(range(0, 101, 10)), | |
kind='hist', | |
legend=True,) | |
pp.savefig() | |
plt.clf() | |
pp.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment