I can't seem to change my directory in python:
import os
os.getcwd()
'C:\\Users\\Jon\\Folder\\IdbyGenotype'
os.chdir(r"C:\Users\Jon\Folder\IdbyGenotype\thisone")
os.getcwd()
'C:\\Users\\Jon\\Folder\\IdbyGenotype'
Am I missing something? What could be going wrong here?
Thanks
Use forward-slash(/) in path whether you are using Windows or Linux
import os
os.getcwd()
'C:\\Users\\Jon\\Folder\\IdbyGenotype'
os.chdir("C:/Users/Jon/Folder/IdbyGenotype/thisone")
This worked in my case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With