如何避免输出到Jupyter Notebook中的可滚动框架中? [英] How to avoid output into scrollable frames in jupyter notebook?

查看:134
本文介绍了如何避免输出到Jupyter Notebook中的可滚动框架中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

突然,语句的输出开始出现在可滚动框架内.

Suddenly, output for statements started to appear inside scrollable frames.

我只玩一个参数

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.

如何避免这种情况?

推荐答案

要禁用自动滚动,请在笔记本单元中执行此javascript,然后再执行其他单元:

To disable auto-scrolling, execute this javascript in a notebook cell before other cells are executed:

%%javascript
IPython.OutputArea.prototype._should_scroll = function(lines) {
    return false;
}

还有一个jupyter笔记本扩展名, autoscroll ,您可以使用更好的UI.

There is also a jupyter notebook extension, autoscroll, you can use for a nicer UI.

这篇关于如何避免输出到Jupyter Notebook中的可滚动框架中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆