pandas 如何避免输出到 jupyter notebook 中的可滚动帧?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41641205/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to avoid output into scrollable frames in jupyter notebook?
提问by Dims
Suddenly, output for statements started to appear inside scrollable frames.
突然,语句的输出开始出现在可滚动框架内。
I was playing with only one parameter
我只玩了一个参数
pd.options.display.max_rows = 1000
but after experiments, I commented this line out and restarted the kernel.
但是经过实验,我注释掉了这一行并重新启动了内核。
Nevertheless, one of my outputs appears inside frame.
尽管如此,我的输出之一出现在框架内。
How to avoid this?
如何避免这种情况?
回答by mtd
To disable auto-scrolling, execute this javascript in a notebook cell before other cells are executed:
要禁用自动滚动,请在执行其他单元格之前在笔记本单元格中执行此 javascript:
%%javascript
IPython.OutputArea.prototype._should_scroll = function(lines) {
return false;
}
There is also a jupyter notebook extension, autoscroll, you can use for a nicer UI.
还有一个jupyter笔记本扩展,自动滚屏,你可以使用一个更好的UI。
回答by Vaibhav Chobisa
I stumbled across the same problem, a scrollbar appeared for outputs out of nowhere.
我偶然发现了同样的问题,突然出现了一个用于输出的滚动条。
Just go to- Cell > All Outputs > Toggle Scrolling (On the Menu Bar) and outputs will go back to no scrolling.
只需转到-单元格>所有输出>切换滚动(在菜单栏上),输出将恢复为不滚动。
回答by Bharat
just use mouse to click on the outside of the Output Frame to toggle between scrolling, it worked for me.
只需使用鼠标单击输出框架的外部即可在滚动之间切换,它对我有用。