How to open local file on Jupyter?

前端 未结 9 1769
星月不相逢
星月不相逢 2020-12-10 13:08

In[1]:

path=\'/Users/apple/Downloads/train.csv\'
open(path).readline()

Out[1]:

FileNotFoundError                         Tr         


        
9条回答
  •  天命终不由人
    2020-12-10 13:25

    I would suggest you to test it firstly: copy this train.csv to the same directory as this jupyter script in and then change the path to train.csv to test whether this can be loaded successfully.

    If yes, that means the previous path input is a problem

    If not, that means the file it self denied your access to it, or its real filename can be something else like: train.csv.

提交回复
热议问题