[英]Order of printing in jupyter notebook
我的代码很简单
df['col'].hist(bins = 250) df['col'].value_counts()
我不明白的是,我的 Jupyter 笔记本中的 output 以相反的顺序出现。
如果我将订单更改为
df['col'].value_counts() df['col'].hist(bins = 250)
然后只出现直方图。
我不明白什么?
hist() 显示视觉图形,而 value_count() 显示文本 output。 除非另有说明,否则视觉数据会在 jupyter 单元中的文本数据之后加载。
在 hist 之后添加plt.show()以刷新您的 window 并在此之前显示视觉 plot。
plt.show()
[英]Custom printing in jupyter notebook
[英]Jupyter notebook cell is not printing anything
[英]Printing on the same line on a jupyter notebook
[英]How to stop printing this in jupyter notebook?
[英]Execution order of jupyter notebook cells
[英]How to repositon cursor while printing in Jupyter notebook
[英]Jupyter Notebook not printing table using tabulate
[英]printing float precision precision in numpy jupyter notebook
[英]Jupyter notebook - invalid syntax when printing [list]
[英]Is sympy pretty printing broken in new jupyter notebook?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.