Reputation: 1227
My code is simple as
df['col'].hist(bins = 250)
df['col'].value_counts()
What I don't understand, my output in my Jupyter notebook appears in reverse order.
If I change the order to
df['col'].value_counts()
df['col'].hist(bins = 250)
then just the histogramm appears.
What am I not understanding?
Upvotes: 1
Views: 754
Reputation: 1649
hist() shows a visual figure while value_count() shows textual output. Unless otherwise specified, the visual data loads after textual data in a jupyter cell.
Add plt.show()
after hist to refresh your window and show the visual plot before that.
Upvotes: 4