TransWikia.com

Unable to immediately continue Jupyer Notebook after closing then reopening the project

Data Science Asked by B R on June 29, 2021

When I reopen a project I am working on in the Jupyter Notebook, and trying to add code, the cell restarts at ‘1’ and the only way I can continue to work with my previous objects present is by rerunning all the code. Is there a better way?

2 Answers

If you

  • run a jupyter server
  • open a new notebook with one cell: x=1
  • close the notebook
  • re-open the notebook
  • add another cell under the 1st: x+1

it would output 2, showing that the variable you had set is still in memory in the kernel

But, if you completely shutdown the jupyter server, or if you shutdown the kernel of your notebook, then you'll need to re-run the whole thing.

EDIT: JupyterLab is now in Beta and worth trying out as recommended here

Answered by Shadi on June 29, 2021

You can heat "Kernel" and Choose "Restart & Run All". Then you do not need to run your codes line by line!

Answered by H2019 on June 29, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP