This website www.ds4n6.io uses its own and third party cookies to collect information that helps to optimize your visit to their web pages. Cookies will not be used to collect personal information. You can either allow or reject their use. You can also change their settings at any time. You will find more information on our Cookie Policy page.

OK

DS4N6 Knowledge >> Tips and Tricks >> Sharing Variables Between Jupyter Notebooks

Sharing Variables Between Jupyter Notebooks

Often times you will be working in different notebooks (with different kernels) and you will want to share a variable from one notebook to the other.

In order to share a variable (e.g. string, dict, Series, DataFrame, etc.) just use the %store magic:

On the “sending” side:

    %store mydf

On the “receiving” side:

    %store -r mydf

That's it!

Read more about the %store magic here: