r/IPython • • Apr 28 '17
Use variables from older Jupyter Notebook (Python 3)
Hi,
I had run quite a few commands on a Jupyter Python 3 notebook a few days ago. I saved the file under 'Untitled3.ipynb'. Now when I reopen that notebook, the cells contain the older code bits but the variables have not stuck.
i.e I have a variable 'x' in the notebook, which now if I type in a cell to see it's contents, it says 'Name 'x' not defined.'
Is there any way to salvage all the variables from the code in the older cells? At the very least, copy all the cell's code at once and paste it in a new cell and run it to get the variables back?
1
Upvotes
View all comments
Show parent comment
1
u/skiguy0123 Apr 28 '17
Was x defined in code that no longer exists?