Skip to content

Instantly share code, notes, and snippets.

@bhishanpdl
Created September 2, 2018 22:28
Show Gist options
  • Save bhishanpdl/3ed45f20d5ca02570bc8f3088c32bc24 to your computer and use it in GitHub Desktop.
Save bhishanpdl/3ed45f20d5ca02570bc8f3088c32bc24 to your computer and use it in GitHub Desktop.
ax = users['gender'].value_counts().plot(kind='bar')
for p in ax.patches:
ax.annotate(np.round(p.get_height(), decimals=2),
(p.get_x()+p.get_width()/2.,
p.get_height()), ha='center',
va='center', xytext=(0, 10),
textcoords='offset points')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment