Skip to content

工具描述:NotebookEdit 笔记本编辑

Tool Description: NotebookEdit

v2.0.14

Tool description for editing Jupyter notebook cells

完全替换 Jupyter 笔记本(.ipynb 文件)中特定单元格的内容为新源代码。Jupyter 笔记本是结合代码、文本和可视化的交互式文档,常用于数据分析和科学计算。notebook_path 参数必须是绝对路径,不能是相对路径。cell_number 采用 0 起始索引。使用 edit_mode=insert 在 cell_number 指定的索引处添加新单元格。使用 edit_mode=delete 删除 cell_number 指定索引处的单元格。


英文原文 / English Original

Completely replaces the contents of a specific cell in a Jupyter notebook (.ipynb file) with new source. Jupyter notebooks are interactive documents that combine code, text, and visualizations, commonly used for data analysis and scientific computing. The notebook_path parameter must be an absolute path, not a relative path. The cell_number is 0-indexed. Use edit_mode=insert to add a new cell at the index specified by cell_number. Use edit_mode=delete to delete the cell at the index specified by cell_number.