Screen Link:
https://app.dataquest.io/m/349/project%3A-learn-and-install-jupyter-notebook/7/text-and-markdown-cells
My Code:
opened_file = open(‘C:\Users\ctpat\Downloads\AppleStore.csv’, encoding=‘utf8’)
from csv import reader
read_file= reader(opened_file)
apps_data = lilst(read_file)
apps_data[:4]
What I expected to happen:
After providing the file path, i encountered with Unicode error, so i did as suggested in instructions, but still got the below mentioned error. I expected it to run error less.
Also i think its better to load .csv files using pandas instead of reader, appreciate your thoughts regarding it.
What actually happened:
File “”, line 1
opened_file = open(‘C:\Users\ctpat\Downloads\AppleStore.csv’, encoding=‘utf8’)
^
SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape
<!--Enter other details below: -->
I tried to open the dataset from same location using
import pandas as pd
apps_data= pd.read_csv("C:\\Users\ctpat\Downloads\AppleStore.csv", encoding='utf8')
and it worked in the jupyter notebook i opened from anaconda, but when i tried the same code into the mision embedded jupyter notebook, it did'nt work, and threw same error. I wonder why?