1 簡介
jupyter lab
是我迄今為止體驗過開展資料分析等任務最舒適的平臺,但這不代表它是完美的,因為在很多方面它仍然存在欠缺,譬如在對csv
檔案的互動式編輯方面。

而本文將要介紹的jupyter lab
外掛就賦予我們高度的互動式操縱csv
檔案的自由,無需excel,就可以實現對csv
表格資料的增刪改查。
2 在jupyter lab中編輯csv檔案
為了能夠在jupyter lab
中實現csv
檔案的編輯,我們需要先安裝外掛jupyterlab-tabular-data-editor
,執行下面的命令完成安裝:
jupyter labextension install jupyterlab-tabular-data-editor
安裝完成後,再次啟動jupyter lab
可以發現在Launcher頁面最下面一排多了一個CSV File
圖示:

點選它就可以開啟嶄新的csv
檔案編輯視窗:

下面我們來看看常用的一些功能:
- 新增行或列
通過點選行或列上的+
,可以建立新的行或列:

- 修改列名
雙擊原有的列名,即可進入編輯狀態修改列名:

- 自由拖動行或列
通過拖拽的方式,可以自由調整某行或某列的位置:

- 單個或多個單元格的複製貼上
同樣支援對單個或多個單元格的複製貼上:

除了這些,還支援對列元素型別的自動推斷及互動式修改等功能:

你可以訪問官方文件來檢視更多功能介紹,有了這個小工具,再配合我們熟悉的pandas
等庫,在jupyter lab
中處理表格資料變得越來越輕鬆~
以上就是本文的全部內容,歡迎在評論區與我進行討論~