Restart Jupyter Kernel Without Losing Variables

A cool Jupyter hack.

While working in a Jupyter Notebook, you may want to restart the kernel due to several reasons. Instead of dumping the variables to disk before restarting Jupyter and reading them back, use the store magic command.

It allows you to store and retrieve a variable back even if you restart the kernel. This avoids the hassle of dumping the object to disk.

Over to you: What are some other cool Jupyter hacks that you know of?

Would you like to have a free 1-on-1 call with me?

Hey friends!

Next week, I will open my calendar for you to schedule a 1-on-1 meeting with me.

👉 What you may use this 1-on-1 call for:

  • Project assistance

  • Career guidance

  • Interview preparation, etc.

👉 Here’s how it will work:

By the end of this week (14th May 2023), you have to write a post on Twitter and/or LinkedIn that highlights your experience with this newsletter and how it has helped you.

On Monday (15th May 2023), I will personally reach out to five readers with some of the best reviews and set up a free 1-on-1 meeting with them.

👉 What if you don’t make it to the top five reviewers?

No worries, I understand that you may have shared your experience because you really need my help.

Thus, I will still contact you over LinkedIn/Twitter/Email and provide personal support over chat.

In other words, you will definitely hear from me in any case, and that’s a promise.

👉 What you may write in the social media post:

  • Why is this newsletter special/valuable to you?

  • How long have you been reading this newsletter for?

  • Why would you recommend it to others?

  • and whatever else that potentially comes to your mind :)

👉 Some guidelines:

  • Don’t forget to tag me in your Twitter and/or LinkedIn posts so that I get notified when you post. Find me on LinkedIn and Twitter here: My LinkedIn | My Twitter.

  • Alternatively, you may reply to this email by sharing the post’s link.

  • Share a comprehensive review and try to keep it limited to ~100-120 words.

  • Feel free to post video-based reviews if you wish to.

I look forward to reading your social media posts over the next few days :)

Thanks for reading!

👉 If you liked this post, don’t forget to leave a like ❤️. It helps more people discover this newsletter on Substack and tells me that you appreciate reading these daily insights. The button is located towards the bottom of this email.

👉 If you love reading this newsletter, feel free to share it with friends!

Find the code for my tips here: GitHub.

I like to explore, experiment and write about data science concepts and tools. You can read my articles on Medium. Also, you can connect with me on LinkedIn and Twitter.

Reply

or to participate.