I'm using this kaggle dataset to perform my data analysis.
I converted 'course_students_enrolled'
column values to integers.
When I plot courses with highest numbers of students, I get a figure where bar labels that represent values above 1M appear written in formula like 1.3e+06
instead of showing the full number. Same goes with the number above the chart.
This is my code of the plot:
popularity_filt = (main_df['course_students_enrolled'].sort_values(ascending=False))
most_pop_courses = main_df.iloc[popularity_filt.index][:10]
course_titles = most_pop_courses['title'].to_list()
data = most_pop_courses[['title','course_students_enrolled']]
sns.set_context(font_scale=3, rc={'font.size':12, 'axes.labelsize':20})
sns.set_style('darkgrid')
palette = sns.color_palette(palette="Greens_d", n_colors=len(data))
plt.figure(figsize=(12,6))
ax = sns.barplot(x='title', y='course_students_enrolled', data=data, palette=np.array(palette[::-1]));
ax.set_xticklabels(course_titles, rotation=40, ha='right')
ax.bar_label(ax.containers[0]);
plt.show()
Is there a way to show full numbers instead?