好用到飛起的12個jupyter lab插件

2020-09-03 Python課堂

1 簡介

  jupyter lab作為jupyter notebook的升級改造版,除了更加人性化的交互界面以及更多的用戶自主定製功能之外,最吸引人的就是其豐富多樣的拓展插件,使得每個使用jupyter lab的人都可以按照自己所需挑選安裝插件,組合出自己心中的完美工作檯。

圖1​


  本文就將給大家介紹在我的日常工作中經常使用到的12個jupyter lab實用插件。

2 jupyter lab實用插件推薦

2.1 debugger

  在jupyter notebook或jupyter lab中debug有多麼蛋疼,嘗試過的朋友們應該都有所體會。但隨著jupyter lab官方插件debugger的橫空出世,在jupyter lab中進行debug變得不再痛苦,充滿了樂趣:

圖2​


  但要注意當前的debugger插件基於xeus內核,這是與我們平常使用的ipykernel內核不太一樣,所以要想在jupyter lab中使用debugger插件,需要先安裝xeus內核再進行debugger的安裝,安裝過程命令如下:

conda install xeus-python=0.8.0 -c conda-forgejupyter labextension install @jupyterlab/debugger

  官方文檔:https://github.com/jupyterlab/debugger

2.2 geojson-extension

  對於經常處理矢量數據的朋友而言,geojson格式的文件想必也是比較熟悉,而jupyter lab中的geojson-extension插件可以幫助我們在jupyter lab界面中以地圖可視化的方式打開查看geojson文件:

圖3​


  但要注意的是,因為是基於leaflet的界面,所以不要用這種方式來查看要素太多的geojson文件(不過應該沒有人會用geojson格式存大量矢量信息吧)

  安裝命令:

jupyter labextension install @jupyterlab/geojson-extension

  官方文檔:https://github.com/jupyterlab/jupyter-renderers

2.3 jupyterlab-toc

  jupyterlab-toc幫助我們在notebook界面利用markdown來創建目錄,輔助我們更好地整合梳理數據分析工作流:

圖4​


  安裝命令:

jupyter labextension install @jupyterlab/toc

  官方文檔:https://github.com/jupyterlab/jupyterlab-toc

2.4 jupyter-matplotlib

  jupyter-matplotlib幫助我們在notebook界面配合matplotlib實現交互式的作圖,只需要在繪圖之前執行魔法命令%matplotlib widget,之後繪製的所有matplotlib圖表即可自動轉換為交互式的:

圖5​


  安裝命令:

pip install ipympljupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-matplotlib

  官方文檔:https://github.com/matplotlib/ipympl

2.5 jupyterlab-drawio

  jupyterlab-drawio是一個讓我們可以在jupyter lab界面內基於drawio繪製流程圖、思維導圖等示意圖的插件:

圖6​


  安裝命令:

jupyter labextension install jupyterlab-drawio

  官方文檔:https://github.com/QuantStack/jupyterlab-drawio

2.6 jupyterlab-execute-time

  jupyterlab-execute-time插件幫助我們在jupyter lab中記錄每個單元cell的執行開始以及運行耗時:

圖7​


  安裝命令:

jupyter labextension install jupyterlab-execute-time

  官方文檔:https://github.com/deshaw/jupyterlab-execute-time

2.7 jupyterlab-plotly

  jupyterlab-plotly是一款幫助plotly圖像在jupyter lab中正常渲染的插件:

圖8​


  安裝命令:

jupyter labextension install @jupyter-widgets/jupyterlab-manager plotlywidget@4.9.0

  官方文檔:https://github.com/plotly/plotly.py

2.8 jupyterlab-spreadsheet

  jupyterlab-spreadsheet幫助我們在jupyter lab中查看表格類文件,特別是其支持查看多工作表的excel表格文件:

圖9​


  安裝命令:

jupyter labextension install jupyterlab-spreadsheet

  官方文檔:https://github.com/quigleyj97/jupyterlab-spreadsheet

2.9 jupyterlab-system-monitor

  jupyterlab-system-monitor通過在jupyter lab界面中添加資源監視器部件,能幫助我們在工作過程中方便的看到CPU、內存的實時佔用情況:

圖10​


  安裝命令:

pip install nbresusejupyter labextension install jupyterlab-topbar-extension jupyterlab-system-monitor

  官方文檔:https://github.com/jtpio/jupyterlab-system-monitor

2.10 keplergl-jupyter

  keplergl-jupyter是我使用非常頻繁的jupyter lab插件,因為沒有它就無法在jupyter lab中正常使用keplergl:

圖11​


  安裝命令:

jupyter labextension install @jupyter-widgets/jupyterlab-manager keplergl-jupyter

  官方文檔:https://github.com/keplergl/kepler.gl/tree/master/bindings/kepler.gl-jupyter

2.11 jupyterlab-kite

  這個插件我們之前的文章仔細介紹過,幫助我們建立代碼補全神器kite與jupyter lab之間的通道,幫助我們在jupyter lab使用kite代碼補全服務:

圖12​


  安裝命令(需要jupyter lab版本大於等於2.2.0):

pip install jupyter-kitejupyter labextension install @kiteco/jupyterlab-kite

  官方文檔:https://github.com/kiteco/jupyterlab-kite

2.12 jupyterlab-variableInspector

  jupyterlab-variableInspector幫助我們在jupyter lab中查看當前環境中存在的變量相關信息,以美觀的界面形式對多種類型的對象予以呈現:

圖13​


  安裝命令:

jupyter labextension install @lckr/jupyterlab_variableinspector

  官方文檔:https://github.com/lckr/jupyterlab-variableInspector

  

  以上就是本文的全部內容,如有疑問歡迎在評論區與我進行討論~

相關焦點

  • 大幅提高生產力:你需要了解的十大Jupyter Lab插件
    目前,大多數在線資源都會使用以下命令來安裝 Jupyter Lab 擴展:jupyter labextension install @jupyterlab/...現在總結一下值得推薦的 10 個 Jupyter Lab 擴展。
  • 神器Jupyter,終於來了!
    ↑↑↑點擊上方藍字,回復資料,10個G的驚喜  如果讀者想要安裝這個新工具,那麼首先你需要為 JupyterLab 裝前端插件:  jupyter labextension install @jupyterlab/debugger  至於後端 Kernel,Jupyter 團隊表示目前 kernel 需要實現 Jupyter Debug Protocol,因此暫時只能用 xeus-python :
  • 我知道你會用Jupyter Notebook,但這些插件你都會了嗎?
    極簡版教程在命令提示符中運行以下命令:pip install jupyter_contrib_nbextensions && jupyter contrib nbextension install啟動 Jupyter Notebook,並導航至新的 Nbextensions 選項卡:
  • Jupyterlab:超強的下一代Jupyter Notebook
    安裝jupyter labextension install @jupyterlab/google-drive除了安裝擴展程序之外,您還必須使用Google對JupyterLab部署進行身份驗證。安裝jupyter labextension install @jupyterlab/github安裝後,我們需要從GitHub獲取憑據。用法
  • 上手jupyter notebook神器
    Anaconda已自動安裝了 Jupter Notebook 及其他工具,還有 Python 中超過 180 個科學包及其依賴項。安裝好 Anaconda 後進入 Anaconda Navigator,可以通過 Anaconda Navigator 啟動 Juypter Notebook 或者 Jupyter Lab。
  • 一款容易上手jupyter notebook神器
    Anaconda已自動安裝了 Jupter Notebook 及其他工具,還有 Python 中超過 180 個科學包及其依賴項。安裝好 Anaconda 後進入 Anaconda Navigator,可以通過 Anaconda Navigator 啟動 Juypter Notebook 或者 Jupyter Lab。
  • Jupyter 進階教程
    拓展Jupyter 是一個開源的工具,因此有很多開發者開發了很多拓展插件,具體可以查看:https://github.com/ipython/ipython/wiki/Extensions-Index在後面介紹的使用資料庫,就採用了插件 ipython-sql,還有就是包含了拼寫檢查、代碼摺疊等等功能的一個拓展插件 Github:https:/
  • 增強Jupyter Notebook的功能,這裡有四個妙招 - 機器之心Pro
    只需要在 shell 命令前加一個感嘆號!,Jupyter 會將其轉換為 Bash。在任一命令前加感嘆號!,它們就可以在 Python Jupyter Notebook 中運行。# Listing folder contents>>> !
  • 用Jupyter Notebooks隱藏優勢打開新世界大門
    Notebook 擴展插件擴展可能性Notebook擴展插件能讓你擺脫使用Jupyter Notebook的一般方式。 Notebook擴展插件(或nbextensions)是JavaScript模塊,你可以在Notebook的前端中加載大多數視圖。 這些擴展插件改變了用戶體驗和接口。
  • Jupyter Notebook作圖教程
    Jupyter Notebook和模塊安裝Jupyter Notebook的運行依賴Python環境,可以支持window和Linux下,我們建議使用最新的Python 3.6版本,在安裝Python 3.6和pip包管理器之後就可以通過pip安裝:pip install jupyter
  • 15個應該掌握的Jupyter Notebook 使用技巧
    並且有許多有趣的插件和神奇的命令,大大增強了python的編程體驗。1. 計算單元的執行時間我們可以在一個jupyter notebook單元的開頭使用%%time命令來計算執行該單元的時間。2. 進度條可以使用python外部庫創建進度條,它可以實時更新代碼運行的進度。它讓用戶知道正在運行的代碼腳本的狀態。
  • 大神教小白搭建Jupyter Notebook環境
    request //刪除request庫conda update request //更新request庫很多時候不同的庫依賴不同的依賴包,需要創建虛擬環境,下面是conda創建虛擬環境的常用命令conda info --envs //查看安裝好的環境
  • 機器學習新手必看:Jupyter Notebook入門指南
    當你還在構建項目原型時,Jupyter Notebooks 真的特別好用,因為你的代碼是被寫入獨立的單元中並被單獨執行的。這允許用戶測試項目中的特定代碼塊,而無需從腳本的開始執行代碼。如果你已經安裝了 Python,那麼 pip 已經安裝好了。
  • 9大Jupyter Notebook擴展工具,工作效率大大提升
    你需要安裝一些擴展插件,才能使Jupyter Notebook的性能更佳。Jupyter Notebook擴展是什麼?Jupyter Notebook擴展是一系列JavaScript代碼,該代碼在後臺中運行,並擴展Notebook的功能。一個擴展負責一個特定的功能,可根據需要安裝或刪除。
  • Jupyter Notebook 的 28 個技巧(下)
    為 Jupyter 安裝其它內核Jupyter 有一個非常好的特性就是可以為不同語言運行內核。舉個慄子,下面就是如何去安裝和運行 R 內核。簡單選項:使用 Anaconda 安裝 R如果你是使用 Anaconda 來管理你的環境,那麼安裝 R 就是很簡單的事情。
  • 測評了上百款瀏覽器插件後,我強烈推薦這12個給你,個個好用
    ~大家好,我是風音~今天我們給大家推薦12個非常實用的瀏覽器插件,可以極大地提升工作效率。那……就試試這兩個插件吧,幫我們自動搜集各大設計網站作品,再也不用收藏一個個網站後再去點擊啦!❶ muzli這個插件真的非常給力!
  • 數據科學和機器學習,Jupyter Notebook入門指南
    這確實也是個不怎麼好回答的問題,因為它沒有具體選項——從面向特定語言的IDE(如R Studio、PyCharm)到Sublime Text、Atom等編輯器——它們都很優秀,所以如果你有選擇恐懼症,你最好讀讀論智的這篇文章,從Jupyter Notebook開始學起。
  • 為jupyter notebook添加目錄(Jupyter安裝拓展nbextensions)
    notebook吧,現在的我算是半個jupyter notebook的愛好者吧,主要是它可以與markdown結合,將前言信息、分析用的code、圖表、展現的結論等信息都可以即時記錄,不用多個文檔間切換記錄。