<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          Jupyter Lab 十大高生產(chǎn)力插件

          共 4305字,需瀏覽 9分鐘

           ·

          2022-05-12 23:42


          二條:分享30個超級好用的Pandas實(shí)戰(zhàn)技巧!
          三條:利用 Pandas 進(jìn)行分類數(shù)據(jù)編碼的十種方式!

          ↑?關(guān)注 + 星標(biāo)?,每天學(xué)Python新技能

          后臺回復(fù)【大禮包】送你Python自學(xué)大禮包

          轉(zhuǎn)自:數(shù)據(jù)studio

          如果你是一個用 Python 的數(shù)據(jù)科學(xué)家,那么用 Jupyter Notebook 就是大概率事件了。作為 Jupyter Notebook 的「下一代」web 應(yīng)用,Jupyter Lab 提供了相比以往更多的便捷功能,其中之一就是擴(kuò)展。

          一代數(shù)據(jù)科學(xué)開發(fā)環(huán)境 Jupyter Lab 應(yīng)該怎么用?讓我們從擴(kuò)展工具開始。

          現(xiàn)在,即使是 Jupyter Lab 開發(fā)者團(tuán)隊(duì)也對如此蓬勃發(fā)展的第三方擴(kuò)展工具社區(qū)而感到興奮了。在這篇文章中,機(jī)器學(xué)習(xí)工程師、計(jì)算機(jī)科學(xué)博士 Christopher Tao 將為讀者介紹 10 種 Jupter Lab 擴(kuò)展工具,它們對于典型的數(shù)據(jù)科學(xué)家 / 工程師來說可以大幅提高生產(chǎn)力。

          10 大 Jupyter Lab 擴(kuò)展

          目前,大多數(shù)在線資源都會使用以下命令來安裝 Jupyter Lab 擴(kuò)展:

          jupyter?labextension?install?@jupyterlab/...

          當(dāng)然,很多人都喜歡使用這種命令。如果你是 VS-Code、Sublime 或 Atom 的用戶,你也許會希望在「管理器」中直接搜索要安裝的內(nèi)容。Jupyter Lab 卻沒有提供這些功能。

          如上圖所示,你可以轉(zhuǎn)到左側(cè)導(dǎo)航欄第 4 個選項(xiàng)卡,即擴(kuò)展管理器(extension manager)。然后就可以搜索到你需要的擴(kuò)展。

          現(xiàn)在總結(jié)一下值得推薦的 10 個 Jupyter Lab 擴(kuò)展。

          JupyterLab 調(diào)試器

          JupyterLab 調(diào)試器指南項(xiàng)目地址[1]

          由于 Jupyter 的交互性,它受到了很多人的喜歡。然而,調(diào)試功能是編碼所必須的。例如,我們可以逐步調(diào)試 for 循環(huán)(for-loop )來查看內(nèi)部發(fā)生了什么。大多數(shù) IDE 工具都支持這種帶有「step over」和「step into」的調(diào)試特性,但遺憾的是,Jupyter 中沒有這種特性。

          「jupyterlab/debugger」就是這樣一個擴(kuò)展,讓我們可以補(bǔ)足 Jupyter Lab 中缺少的這個功能。

          圖源:https://blog.jupyter.org/

          JupyterLab-TOC

          JupyterLab-TOC 項(xiàng)目地址[2]

          notebook 太長?想讓你的 notebook 看起來更漂亮?或者希望 notebook 有一個目錄?「jupyterlab/toc」幫你實(shí)現(xiàn)。

          圖源: https://github.com/jupyterlab/

          有了這個擴(kuò)展,基于用標(biāo)題標(biāo)記的單元格會自動生成目錄(確保使用標(biāo)記 ## 來指定你的標(biāo)題級別)。這也是使用 Jupyter Notebook 的好方法,讓你的工作更有系統(tǒng)性和組織性。

          JupyterLab-DrawIO

          JupyterLab-DrawIO 項(xiàng)目地址[3]

          Diagram.net(原名 Draw.IO)是繪制圖表的工具,它確實(shí)是 MS Visio 完美的開源替代品。借助于 jupyterlab-drawio,我們可以在 Jupyter Lab 上使用該工具。

          圖源:https://github.com/QuantStack/

          JupyterLab Execution Time

          JupyterLab Execution Time 項(xiàng)目地址[4]

          Jupyter Notebook/Lab 的一個驚人特性是它能提供許多有用的魔術(shù)命令(magic command)。例如我們可以使用「%timeit」測試代碼運(yùn)行時間。它將運(yùn)行代碼片段數(shù)百或數(shù)千次,并得到平均值,以確保給出一個公平和準(zhǔn)確的結(jié)果。

          但有時并不需要這樣精確。我們只不過想知道每個單元運(yùn)行的時間,在這種情況下,為每個單元使用「%timeit」變得不合適了。

          在這種情況下,我們可以使用「jupyterlab-execute-time」。

          如上圖所示,「jupyterlab-execute-time」不僅顯示了執(zhí)行單元的時間間隔,而且還顯示了最后執(zhí)行的時間。

          JupyterLab Spreadsheet

          JupyterLab Spreadsheet 項(xiàng)目地址[5]

          作為一名數(shù)據(jù)科學(xué)家或數(shù)據(jù)工程師,你不得不與電子表格打交道。但是,Jupyter 本身不支持讀取 Excel 文件,這迫使我們需要打開多個工具,在 Jupyter 編碼以及 Excel 之間不停地切換。

          「jupyterlab-spreadsheet」可以很好地解決這類問題。它在 Jupyter Lab 中嵌入了 xls/xlsx 電子表格查看功能,因此我們可以在同一個地方獲得所需的一切。

          圖源: https://github.com/quigleyj97/

          JupyterLab System Monitor

          jupyterlab-system-monitor 項(xiàng)目地址[6]

          Python 不是一種高效執(zhí)行的編程語言,這意味著與其他語言相比,它可能會消耗更多的 CPU 和內(nèi)存資源。Python 的最常見用例之一是數(shù)據(jù)科學(xué)。所以,我們可能想要監(jiān)控自身系統(tǒng)硬件資源,從而注意到 Python 代碼可能凍結(jié)了操作系統(tǒng)。

          jupyterlab-topbar-extension 你想要擁有的擴(kuò)展,它可以在 Jupyter Lab UI 的頂部欄顯示 CPU 和內(nèi)存使用情況,這樣我們就可以實(shí)時監(jiān)控了。如下動圖所示:

          圖源:https://github.com/jtpio/

          JupyterLab Kite

          jupyterlab-kite 項(xiàng)目地址[7]

          雖然我很喜歡 Jupyter,但它不像其他經(jīng)典 IDE 工具一樣提供代碼自動補(bǔ)全功能。Jupyter 的代碼自動補(bǔ)全非常受限且速度很慢。

          你可能聽說過免費(fèi)的 AI 賦能代碼補(bǔ)全服務(wù) Kite,它在 Sublime、VS Code 和 PyCharm 等幾乎所有流行的 IDE 工具中都可以使用。通過 jupyterlab-kite (https://github.com/kiteco/jupyterlab-kite) 擴(kuò)展,你也可以在 Jupyter Lab 中使用這一功能。

          圖源:https://github.com/kiteco/

          JupyterLab Variable Inspector

          jupyterlab-variableInspector 項(xiàng)目地址[8]

          如果你是從 R studio 或 Matlab 轉(zhuǎn)向使用 Jupyter Lab 的數(shù)據(jù)科學(xué)家,則可能對這些工具提供的變量檢測器非常熟悉。但遺憾的是,Jupyter Lab 默認(rèn)不支持這一功能。這時,jupyterlab-variableInspector 擴(kuò)展可以重新支持該功能。

          圖源:https://github.com/lckr/

          JupyterLab Matplotlib

          Matplotlib/ipympl 項(xiàng)目地址[9]

          如果你是數(shù)據(jù)科學(xué)家,則 Matplotlib 是必須學(xué)習(xí)(must-learn)的 Python 庫。該庫是 Python 中一個基礎(chǔ)但強(qiáng)大的數(shù)據(jù)可視化工具。但當(dāng)我們使用 Jupyter Lab 時,交互特征消失了。

          jupyter-matplotlib 擴(kuò)展可以使 Matplotlib 再次具備交互性。只需要輸入一個魔術(shù)命令 %matplotlib widget 來啟動它,則你的精美 3D 圖表就變成交互式的。如下動圖所示:

          圖源:https://github.com/matplotlib/ipympl

          JupyterLab Plotly

          Plotly 使用指南[10]

          雖然 Matplotlib 是最基礎(chǔ)和強(qiáng)大的數(shù)據(jù)可視化庫,但在這方面我最喜歡的是 Plotly 庫。該庫封裝了很多常見圖表,我們可以通過數(shù)行代碼生成令人驚嘆的圖表。

          為使 Jupyter Lab 無縫支持和顯示交互的 Plotly 圖表,用戶需要安裝 jupyterlab-plotly。

          原文鏈接:

          https://towardsdatascience.com/10-jupyter-lab-extensions-to-boost-your-productivity-4b3800b7ca2a

          參考資料

          [1]

          JupyterLab調(diào)試器指南項(xiàng)目地址:?https://blog.jupyter.org/a-visual-debugger-for-jupyter-914e61716559

          [2]

          JupyterLab-TOC 項(xiàng)目地址:?https://github.com/jupyterlab/jupyterlab-toc

          [3]

          JupyterLab-DrawIO 項(xiàng)目地址:?https://github.com/QuantStack/jupyterlab-drawio

          [4]

          JupyterLab Execution Time 項(xiàng)目地址:?https://github.com/deshaw/jupyterlab-execute-time

          [5]

          JupyterLab Spreadsheet 項(xiàng)目地址:?https://github.com/quigleyj97/jupyterlab-spreadsheet

          [6]

          jupyterlab-system-monitor 項(xiàng)目地址:?https://github.com/jtpio/jupyterlab-system-monitor

          [7]

          jupyterlab-kite 項(xiàng)目地址:?https://github.com/kiteco/jupyterlab-kite

          [8]

          jupyterlab-variableInspector 項(xiàng)目地址:?https://github.com/lckr/jupyterlab-variableInspector

          [9]

          Matplotlib/ipympl 項(xiàng)目地址:?https://github.com/matplotlib/ipympl

          [10]

          Plotly 使用指南:?https://plotly.com/python/getting-started/#jupyterlab-support-python-35




          1. 有個大神級女朋友是什么體驗(yàn)

          2. 建議收藏,22個Python迷你項(xiàng)目(附源碼)

          3. Python一鍵替換證件照背景,還用去照相館?


          瀏覽 50
          點(diǎn)贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          分享
          舉報(bào)
          評論
          圖片
          表情
          推薦
          點(diǎn)贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  91精品91久久久久77777 | 成人性爱视频免费在线观看 | 一二三级视频 | 精品久久久久久久久久久久久 | 免费日本黄色电影 |