(Errno 2) No such file or directory: 'C:/Users/Пользователь/Downloads/Train_rev1.csv'

88 views Asked by At

I have a problem.

data = pd.read_csv('C:/Users/Пользователь/Downloads/Train_rev1.csv',
                   encoding='cp1252')

FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/Пользователь/Downloads/Train_rev1.csv'.

The file itself is located there. What to do?

Initially, there were problems with encoding. I changed it, then tried to put

(r' ', encoding='cp1252')

but this didn't solve the problem either.

1

There are 1 answers

0
حمزة نبيل On

One simple solution :

  1. Create a folder data in your working directory
  2. Move the CSV file to data folder
  3. Read the file using :
pd.read_csv('data/Train_rev1.csv')