美文网首页
jupyter notebook输出打印的系统设置

jupyter notebook输出打印的系统设置

作者: chenglansky | 来源:发表于2019-07-17 12:31 被阅读0次

    多行输出

    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

    相关文章

      网友评论

          本文标题:jupyter notebook输出打印的系统设置

          本文链接:https://www.haomeiwen.com/subject/ehrqlctx.html