1sns.set(style="whitegrid")
2plt.figure(figsize=(8,5))
3total = float(len(train_df))
4ax = sns.countplot(x="event", hue="event", data=train_df)
5plt.title('Data provided for each event', fontsize=20)
6for p in ax.patches:
7 percentage = '{:.1f}%'.format(100 * p.get_height()/total)
8 x = p.get_x() + p.get_width()
9 y = p.get_height()
10 ax.annotate(percentage, (x, y),ha='center')
11plt.show()
12