Problems related to importing or exporting *.csv files.
I have Problems related to importing or exporting *.csv files.
Users of any operating system:
For those of you who feel comfortable in using more advanced bits of code, here’s another way of dealing with this problem.
To retrieve the path to the directory where the notebook file you’ve been working on has been stored and where new files would be automatically saved, you need to execute the following lines of code.
import os, inspect
if '__file__' not in locals():
fx = inspect.getframeinfo(inspect.currentframe())
fx = __file__
os_dir = os.path.dirname(os.path.abspath(fx))
Having assigned the correct value to os_dir, all references to files could be represented as