Jupyter Lab自己使用的插件整理(未完)


前言

使用过多个Python的代码编译器:Pycharm、VScode、Anaconda(Jupyter Notebook、Spyder、Jupyter Lab)等,个人最喜欢的还是Jupyter Lab,整理了一下自己所装的插件和使用情况。
关于Jupyter Lab我的探索有限,如果大家有更好的使用建议和技巧,欢迎交流!
还没有写完,等有空时继续写完。


Jupyter Lab界面简洁,还可以设置添加其他语言如R、Julia;可以直接打开、编辑csv等文件……下面是我的Jupyter Lab开始界面:
Jupyter Lab
本文主要介绍我的插件情况,关于Jupyter Lab的更多内容后面慢慢补充。插件情况

  • jupyterlab-variableinspector
  • jupyterlab-execute-time
  • jupyterlab-tabular-data-editor
  • jupyterlab-drawio
  • jupyter-matplotlib
  • jupyter-widgets-jupyterlab-manager
  • bokeh-jupyter-bokeh
  • jupyterlab-jupytext
  • jupyter_contrib_nbextensions
  • JupyterLab LSP

1.jupyterlab-variableinspector

jupyterlab-variableinspector插件可以为我们展示当前界面内的所有变量情况。
详细介绍见项目文档:https://github.com/jupyterlab-contrib/jupyterlab-variableInspector
安装命令:jupyter labextension install @lckr/jupyterlab_variableinspector
也可以在https://pypi.org/project/lckr-jupyterlab-variableinspector/#history
下载对应版本的包,再使用pip install,把文件拖到后面回车直接安装。

安装完成后重启Lab,右键任一代码块,点击画圈处:Open Variable lnspector打开变量管理插件。
在这里插入图片描述
鼠标拖动画圈处可以调整其位置;
在这里插入图片描述
可以点击“放大镜”查看变量细节,比如下面我想查看一个dataframe的内容:
在这里插入图片描述

2.jupyterlab-execute-time

jupyterlab-execute-time可以记录每个代码块的最近一次运行的具体时间和运行耗时,同时为正在运行的代码块记录时间。非常实用!
在这里插入图片描述
详细介绍见项目文档:https://github.com/deshaw/jupyterlab-execute-time
安装命令:jupyter labextension install jupyterlab-execute-time
也可以在https://pypi.org/project/jupyterlab-execute-time/#history下载包后通过pip安装,一定要注意版本匹配

3.jupyterlab-tabular-data-editor

jupyterlab-tabular-data-editor可以让我们实现在Lab中直接编辑csv文件
详细介绍见项目文档:https://github.com/jupytercalpoly/jupyterlab-tabular-data-editor
安装命令:pip install jupyterlab-tabular-data-editor
下载包:https://pypi.org/project/jupyterlab-tabular-data-editor/#history
在这里插入图片描述
现在觉得这插件太鸡肋了,改动一个两个数值的挺方便,改动多的话还是别在这里改。

4.jupyterlab-drawio

jupyterlab-drawio可以让我们直接在Lab中创建流程图,我觉得在这里绘制不比Word、PPT、Visio里的差多少。
详细介绍见项目文档:https://github.com/QuantStack/jupyterlab-drawio
安装命令:jupyter labextension install jupyterlab-drawio
pip安装:pip install jupyterlab-drawio
下载包:https://pypi.org/project/jupyterlab-drawio/#history

启动页点击Diagram 进入流程图制作界面。
在这里插入图片描述
在这里插入图片描述

5.jupyter-matplotlib

jupyter-matplotlib可让我们在Lab中实现绘图交互操作。
详细介绍见项目文档:https://github.com/matplotlib/ipympl
安装命令:jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-matplotlib
pip安装:pip install ipympl
下载包:https://pypi.org/project/ipympl/#history

在绘图前运行魔法口令:%matplotlib widget,即可实现界面内图片交互。
在这里插入图片描述

运行%matplotlib qt5,可实现弹窗交互,需要安装PyQt5库。
在这里插入图片描述
运行%matplotlib inline,图片显示在代码块下方。
在这里插入图片描述
出现问题或想切换交互方式,重启Lab即可。


总结

介绍了自己使用的一些Jupyter Lab插件,不过还没写完,下次再全部写好。

参考网站

  • 15
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值