How to export current notebook in HTML on Jupyter

后端 未结 3 1638
渐次进展
渐次进展 2021-02-04 02:03

How can I export the current notebook (from inside the notebook itself, using Python) to HTML (to a custom output path)?

3条回答
  •  醉话见心
    2021-02-04 02:46

    By looking at nbconvert docs, you'll see that you can use --to html method:

    import os
    
    os.system('jupyter nbconvert --to html yourNotebook.ipynb')
    

    This will create a yourNotebook.html file inside yourNotebook.ipynb folder.

提交回复
热议问题