Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.