My Code:
newfile = open(“AppleStore.csv”, encoding=‘utf8’ )
from csv import reader
file_cont = reader(newfile)
apl_store_data = list(file_cont)
newfile_g = open(“googleplaystore.csv”, encoding=‘utf8’ )
from csv import reader
file_cont_g = reader(newfile_g)
ggl_store_data = list(file_cont_g)
Replace this line with your code
What I expected to happen:
Open the csv file
What actually happened:
UnicodeDecodeError Traceback (most recent call last)
in
2 from csv import reader
3 file_cont = reader(newfile)
----> 4 apl_store_data = list(file_cont)
5
6 newfile_g = open(“googleplaystore.csv”)
~/opt/anaconda3/lib/python3.8/codecs.py in decode(self, input, final)
320 # decode input (taking the buffer into account)
321 data = self.buffer + input
–> 322 (result, consumed) = self._buffer_decode(data, self.errors, final)
323 # keep undecoded input until the next call
324 self.buffer = data[consumed:]
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xd1 in position 8: invalid continuation byte
Replace this line with the output/error