1

I am currently trying to save my whole Jupyter Notebook environment (working throught Anaconda 3). By environment, I mean, all the objects created (dataframes, lists, tuples, models, ...).

Unfortunately I don't have Linux even though there seemed to be Linux command solutions. I tried finding a solution with pickle as recommended in the following topic but it seems that you have to specify which objects you want to dump and load.

saving-and-loading-multiple-objects-in-pickle

What I would like to do is that everything saves and loads as it can be done with R, where you just save and load an .RData file.

Yacine Hajji
  • 1,124
  • 1
  • 3
  • 20

1 Answers1

4

You can use Dill to store your session

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')
Himanshu Poddar
  • 7,112
  • 10
  • 47
  • 93