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上。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章