jupyter notebook输出打印的系统设置

2019-07-17  本文已影响0人  chenglansky

多行输出

Notebook的中开头cell中添加以下代码可以实现多行输出:

from IPython.core.interactiveshell import InteractiveShell 
InteractiveShell.ast_node_interactivity = 'all'
 #默认为'last'

想一劳永逸的设置,那么可以去C:\Users\ThinkPad.ipython\profile_default目录创建ipython_config.py文件
将下面的文字复制保存,重启Notebook后即可生效。

c = get_config()
c.InteractiveShell.ast_node_interactivity = "all"

来源于https://www.jianshu.com/p/a85bc2a8fa56

上一篇下一篇

猜你喜欢

热点阅读