Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Jupyter Cheatsheet

📅 2019-Dec-28 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ cheatsheet, jupyter ⬩ 📚 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


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧