Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marknagelberg/8bf83aedb5922a325cd673dec362871e to your computer and use it in GitHub Desktop.
Save marknagelberg/8bf83aedb5922a325cd673dec362871e to your computer and use it in GitHub Desktop.
load_word_doc_post_num_posts_by_author_plot.py
data = pd.read_csv('results.csv')
num_posts_by_author = data.groupby('author').size().sort_values(ascending = True)
num_posts_by_author_plot = num_posts_by_author.plot('barh', figsize=(5,5))
num_posts_by_author_plot.set_xlabel('Number of Posts on Marginal Revolution')
fig = num_posts_by_author_plot.get_figure()
fig.savefig('report_images/num_posts_by_author_plot.png', bbox_inches="tight")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment