Ask Your Question
0

What is DATA variable analog when running in Jupyter notebook?

asked 2019-09-18 18:11:45 +0100

In the Sagemath notebook (now deprecated), the DATA variable is the location of the data storage area of the worksheet. When using Jupyter notebook with Sagemath kernel, what would be the analog of this variable?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2019-09-18 18:53:41 +0100

nbruin gravatar image

When you run code in a jupyter notebook, the code just runs with the current directory set to the location of the ipynb file. So if you execute something like save(...) or load(...), that is where the files would be located. You can change the current directory with os.chdir to another directory, and then you can load and save from/to there. You'd have to make sure to re-execute that change when you restart the kernel. Or you can specify full paths and not depend on the current directory at all.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-09-18 18:11:45 +0100

Seen: 139 times

Last updated: Sep 18 '19