unable to load data set into jupyter notebook
After running this line of code ;
data = pd.read_csv("C:\Users\USER\Desktop 1.01. Simple linear regression");
i get this syntax error
File "C:\Users\USER\AppData\Local\Temp/ipykernel_10208/1374974937.py", line 1
data = pd.read_csv("C:\Users\USER\Desktop 1.01. Simple linear regression")
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
Thanks, I hope to get quick feedback from you regarding this issue.
Hey!
Substitute all backslash symbols \
with double backslashes such that the path looks as follows:
C:\\Users\\USER\\Desktop\\1.01. Simple linear regression.csv
To avoid entering the full path, put your notebook in the same folder as the .csv file. In that way, you would only need to specify the name of the database.
Kind regards,
365 Hristina
What do you mean by put your notebook in the same folder ? Is it putting the CSV in the same folder or the notebook?
Hey Martin,
Than you for reaching out!
What I meant is to put both the Jupyter notebook and the CSV file in the same folder, as demonstrated in the screenshot below.
Regarding the error on your screenshot, you should execute the code
import pandas as pd
before loading the data.
Hope this helps!
Kind regards,
365 Hristina