pandas.read_csv FileNotFoundError: File b'\xe2\x80\xaa' despite correct path

前端 未结 13 1299
南笙
南笙 2020-12-15 20:14

I\'m trying to load a .csv file using the pd.read_csv() function when I get an error despite the file path being correct and using raw strings.

13条回答
  •  青春惊慌失措
    2020-12-15 21:12

    import pandas as pd
    
    path1 = 'C:\\Users\\Dell\\Desktop\\Data\\Train_SU63ISt.csv'
    path2 = 'C:\\Users\\Dell\\Desktop\\Data\\Test_0qrQsBZ.csv'
    
    df1 = pd.read_csv(path1)
    df2 = pd.read_csv(path2)
    
    print(df1)
    print(df2)
    

提交回复
热议问题