My bad, maybe I wasn't clear the first time. I am indeed talking about the cwd of my kernel process.
When I run jupyter from the command line and I open an ipynb file, the cwd of the kernel process will always default to a one different from where it was opened.
E.g.
'C:\\Users\\XXX\\Dropbox\\esen_ra\\data\\interim\\ja'
That's what I get from running the command "pwd" everytime I open a new ipynb file. So I have to (always) write os.chdir(globals()['_dh'][0]) in order to get:
'C:\\Users\\XXX\\Dropbox\\Master\\ESEN\\Ayudantías\\Python'
Which is the correct path where I opened the file. I'm not sure if this helps, but if I run jupyter from Anaconda Navigator, I do not have this problem.
I apologize if I'm making things more confusing than they actually are.
Software versions:
jupyter: 1.0.0
jupyter-client: 5.3.4
jupyter-console: 6.1.0
jupyter-contrib-core: 0.3.3
jupyter-contrib-nbextensions: 0.5.1
jupyter-core: 4.6.1
jupyter-highlight-selected-word: 0.2.0
jupyter-latex-envs: 1.4.6
jupyter-nbextensions-configurator: 0.4.1
jupyterthemes: 0.20.0
Thanks in advance,
JA.