用了这个jupyter插件,我已经半个月没打开过excel了

点击上方"蓝字"关注我们
记录 分享 成长
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
中处理表格数据变得越来越轻松~
以上就是本文的全部内容,欢迎在评论区与我进行讨论~

加入我们的知识星球【Python大数据分析】
爱上数据分析!
Python大数据分析
data creates value
扫码关注我们
评论