Daily Dose of Data Science

Share this post

Restart the Kernel Without Losing Variables

www.blog.dailydoseofds.com

Restart the Kernel Without Losing Variables

Avi Chawla
Oct 23, 2022
1
Share

While working in a Jupyter Notebook, you may want to restart the kernel due to several reasons. But before restarting, one often tends to dump data objects to disk to avoid recomputing them in the subsequent run.

The "store" magic command serves as an ideal solution to this. Here, you can obtain a previously computed value even after restarting your kernel. What's more, you never need to go through the hassle of dumping the object to disk.

Thanks for reading Daily Dose of Data Science! Subscribe for free to learn something new and insightful about Python and Data Science every day. Also, get a Free Data Science PDF (250+ pages) with 200+ tips.


Read this post on LinkedIn: Post Link.

I like to explore, experiment and write about data science concepts and tools. You could connect with me on LinkedIn.

1
Share
Previous
Next
Comments
Top
New
Community

No posts

Ready for more?

© 2023 Avi Chawla
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing