I want to count the number of student who got 0-5 grade in one dataset
I use this function final_grade_num =pd.value_counts(final_grade)
to get a result like
4.0 487
3.0 432
2.0 376
5.0 334
1.0 232
0.0 139
however, I want to get a sorted list like
0.0 139, 1.0 232...5.0 334
because I need to use this dataset to draw a plot
plt.bar(range(0,6), final_grade_num)
Is there any method to change, I tried to use sorted method, but the result shows it depends on the number of students, not grade
sort_values
final_grade.value_counts().plot()
.