Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How python merges multiple notebook files with nbmerge

Shulou Source: shulou.com Published: 2022-06-02 06:13:28 10月01日 Update

This article mainly explains "python how to use nbmerge to merge multiple notebook files", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "python how to merge multiple notebook files with nbmerge" bar!

I usually like to use notebook, the courseware of the course is generally divided into multiple notebook, but recently, July 13-18, 2019 (Hangzhou) Stata & Python empirical metrology and reptile analysis summer workshop is approaching, so the courseware needs to be printed in advance.

Printing courseware in order to prevent errors, each instructor tries to provide only one pdf file, but my courseware is actually a dozen notebook files, which need to be merged into one notebook to output into a pdf file in the browser, which is convenient to print, but how to merge it?

Fortunately, there is google, which was found after search.

Github library https://github.com/jbn/nbmerge installation! pip3 install nbmerge usage

Open the command line and change to the folder where the notebook you want to operate is located.

Nbmerge file_1.ipynb file_2.ipynb file_3.ipynb > merged.ipynb

For example, in this tutorial, we created two new ipynb files, 01.ipynb and 02.ipynb.

Successful merger of 01.ipynb and 02.ipynb files thank you for reading, these are the contents of "python how to merge multiple notebook files with nbmerge". After the study of this article, I believe you have a deeper understanding of how python uses nbmerge to merge multiple notebook files, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Files multiple courseware learning content ordinary successful classified two command empirical actual actually that is ideas situations locations tutorials folders articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Redmi Shulou Information OPPO Reno MariaDB