美文网首页呆鸟的Python数据分析
玩转Jupyter Notebook2-(推荐16个超实用插件)

玩转Jupyter Notebook2-(推荐16个超实用插件)

作者: pythonic生物人 | 来源:发表于2020-09-28 22:30 被阅读0次

本文推荐Jupyter Notebook 16个超实用插件,续前篇:


本文速览

    窗口分面:Scratchpad
    Markdown文本高亮:Highlighter
    Cell标记、锁定:Runtools
    代码折叠:Code folding
    example、document快速获取:Snippets menu
    PEP8 代码优化:Code prettify
    代码补全:Hinterland
    显示行号:Toggle all line numbers 
    添加目录:Table of Contents (2)
    按标题折叠:Collapsible headings
    文件过滤:Tree Filter
    代码字号收缩:Code Font Size 
    字符选中高亮:Highlight selected word
    快捷键编辑:Keyboard shortcut editor
    编辑模式切换:Select CodeMirror Keymap
    变量收集浮窗:Variable Inspector

插件安装

pip install jupyter_contrib_nbextensions -i https://pypi.tuna.tsinghua.edu.cn/simple
jupyter contrib nbextension install --user
pip install jupyter_nbextensions_configurator -i 
以上三步结束,重新启动jupyter notebook即可搞定,出现以下表示安装完毕。 image

下面分享一些个人感觉实用的插件:


窗口分面:Scratchpad

新开一个窗口,在数据分析过程中非常有用,比如你画了个图,想对照着图看绘图数据、或者看看修改参数后的效果图。快捷键:Ctrl键+B键

image

Markdown文本高亮:Highlighter

高亮Markdown cell中选择的文本。

%%javascript
require("base/js/utils").load_extensions("highlighter/highlighter")
image

Cell标记、锁定:Runtools

该插件为为默认Cell的一个很好补充,先看下cell本来具有的功能:

image Runtools中几个有用功能重点介绍下,特别是标记和锁定cell image image

代码折叠:Code folding

代码折叠 image

Document快速获取:Snippets menu

快速添加python、常见模块的example、document等等。 image

PEP8规范优化代码:Code prettify

按照PEP8 Python编码规范:《PEP 8 -- Style Guide for Python Code》美化代码,依赖Google开发的YAPF模块。

pip install yapf -i  https://pypi.tuna.tsinghua.edu.cn/simple 
image

代码补全:Hinterland

代码自动补全。 image

显示行号:Toggle all line numbers

显示代码行号。 image jupyter notebook默认自带设置行号功能 image

添加目录:Table of Contents (2)

给notebook添加目录 image

按标题折叠:Collapsible headings

notebook按标题折叠 image

文件过滤:Tree Filter

文件过滤。 image

代码字号收缩:Code Font Size

代码块字体放大缩小。 image

字符选中高亮:Highlight selected word

高亮选中的字符。 image

快捷键编辑:Keyboard shortcut editor

编辑、删除已有快捷键;添加新的快捷键。 image

编辑模式切换:Select CodeMirror Keymap

如果你习惯了使用 emacs, vim, and sublime,该插件非常适合你。 image

变量收集浮窗:Variable Inspector

使用浮窗表格收集notebook中的变量信息。 image

参考资料:https://github.com/ipython-contrib/jupyter_contrib_nbextensions

更多好文,欢迎关注:pythonic生物人

相关文章

网友评论

    本文标题:玩转Jupyter Notebook2-(推荐16个超实用插件)

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