Skip to content

Jupyter Notebooks

#TODO

Personal Experience

N/A

Tools & Software Integrations

N/A

N/A

Resources

N/A

Notes and Troubleshooting

Sharing Data Between Jupyter Notebooks with Storemagic

To share data between Jupyter Notebooks it can be persisted as stored variables using Storemagic. This saves the variables outside the notebook kernel in the shared IPython database. It can be particularly useful for quickly sharing dataframes.

  1. Store data from the first notebook:
data = <DATA TO STORE>
%store data
del data
  1. Restore data in the second notebook:
%store -r data
data
  1. Clear the data from the IPython database:
%store -d data

Source: https://ipython.org/ipython-doc/rel-0.12/config/extensions/storemagic.html