How to pickle or store Jupyter (IPython) notebook session for later

前端 未结 3 1525
[愿得一人]
[愿得一人] 2020-11-30 17:38

Let\'s say I am doing a larger data analysis in Jupyter/Ipython notebook with lots of time consuming computations done. Then, for some reason, I have to shut down the jupyte

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-30 18:10

    I think Dill answers your question well.

    pip install dill
    

    Save a Notebook session:

    import dill
    dill.dump_session('notebook_env.db')
    

    Restore a Notebook session:

    import dill
    dill.load_session('notebook_env.db')
    

    Source

提交回复
热议问题