I couldn’t find a place for me to change the working directory in Jupyter Notebook, so I couldn’t use the pd.read_csv method to read in a specific csv document.
Is there any way to make it? FYI, I’m using Python3.5.1 currently.
Thanks!
Advertisement
Answer
Running os.chdir(NEW_PATH)
will change the working directory.
JavaScript
x
15
15
1
import os
2
os.getcwd()
3
Out[2]:
4
'/tmp'
5
In [3]:
6
7
os.chdir('/')
8
In [4]:
9
10
11
os.getcwd()
12
Out[4]:
13
'/'
14
In [ ]:
15