Google colab changing directory

后端 未结 6 2006
我在风中等你
我在风中等你 2020-12-09 10:44

I can\'t change my directory in Google colab. when I type cd it gives output like this \'/content\' I tried to change the directory using import os os.chdir(\"drive\")

6条回答
  •  一个人的身影
    2020-12-09 11:22

    /content/ is the default directory in which all of your files and data are saved. To change the directory you can do something like this: Create a folder inside the /content/ which is recommended. Then run this: import os os.chdir('/content/folder_name') If you run !pwd you could see the path changed to /content/folder_name

提交回复
热议问题