Jupyter notebook插件nbextensions

Jupyter notebook插件nbextensions

nbextensions安装

安装jupyter_contrib_nbextensions

在Anaconda Prompt中输入如下命令

pip install jupyter_contrib_nbextensions

image-20200626185914902

这个时候重启jupyter notebook发现还是没有

image-20200626190021999

安装jupyter_nbextensions_configurator

conda install -c conda-forge jupyter_nbextensions_configurator

image-20200626190201380

现在出现了nbextensions选项卡,但是里面没有东西

image-20200626190259791

安装 javascript and css files

jupyter contrib nbextension install --user

然后刷新一下页面就出现了nbextensions工具

image-20200626190511592

nbextensions配置

生成导航栏:Table of Contents(2)

通过markdown语法设置标题可以快速定位代码,使用的时候像word一样方便。

image-20200626190845328

变量监视器:Variable Inspector

image-20200626191147290

打开Variable Inspector,可以查看变量的值。

word = 'hello'

image-20200626191301418

word = 'world'

image-20200626191515688

word = 'hello world'

image-20200626191545278

显示代码运行时间:ExcecuteTime

打开ExcecuteTime之后可以看到各个cell的运行时间。

image-20200626191725088

image-20200626191823560

代码折叠:Codefolding

将代码中的循环、函数等折叠起来,方面调试。

折叠前

image-20200626192047521折叠后

image-20200626192113030

定时自动保存:AutoSaveTime

设置每两分钟保存一次

image-20200626192213495

代码提示:Hinterland

image-20200626192708174

总结

nbextensions丰富了jupyter notebook的功能,将IDE中的很多功能都移植到了jupyter notebook上。

  • 7
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值