在Jupyter(ipython)中将两个笔记本合并为一个 [英] Merging two noteboooks into one in Jupyter (ipython)

查看:636
本文介绍了在Jupyter(ipython)中将两个笔记本合并为一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个不同的Jupyter笔记本电脑,用于两个不同的项目.我想将它们合并以将它们放在同一笔记本上.

I have two different Jupyter notebooks for two different projects. I would like to merge them to get them both on the same notebook.

一种方法是将单元格从一个单元复制到另一个单元,但是对于包含多个单元格的项目而言,这似乎需要大量工作.是否有一项功能支持一次导入Notebook文档或一次复制多个单元格?

One way is to copy cells from one to the other one but it seems to be quite a bit of work for projects containing many cells. Is there a feature supporting importing Notebook documents or copying multiple cells at a time?

推荐答案

您可以将笔记本与 nbmerge 合并

使用pip安装

pip install nbmerge

并与您的文件合并

nbmerge file_1.ipynb file_2.ipynb file_3.ipynb > merged.ipynb

这篇关于在Jupyter(ipython)中将两个笔记本合并为一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆