Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Jupyter Cheatsheet

📅 2019-Dec-28 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

$ jupyter nbconvert --to script foobar.ipynb

The output text file will only have the Python code from the notebook and will not have all the explanatory text.

This will drop all the explanatory text that might have been in the notebook.

$ jupyter nbconvert --to python foobar.ipynb

The output Python file will have the Python code from the notebook interspersed with the explanatory text from the notebook added as Python comments.

Tried with: Jupyter 4.4.0 and Ubuntu 18.04