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.
One simple solution :
- Create a folder
data
in your working directory - Move the CSV file to
data
folder - Read the file using :
pd.read_csv('data/Train_rev1.csv')
Welcome! Shoudn’t it be (escaped) backslashes for Windows paths? Like this:
'C:\\Users\\Пользователь\\Downloads\\Train_rev1.csv'
?