Unable to create a list from csv file

I downloaded anaconda and using jupyter on my local computer. However, after using from csv import reader, I am unable to convert my csv file into list of lists. Here is my code and error message:

Apple Data Set

open_apple = open(‘AppleStore.csv’)
read_apple = reader(open_apple)
list_apple = list(read_apple)

UnicodeDecodeError Traceback (most recent call last)
2 open_apple = open(‘AppleStore.csv’, ‘r’)
3 read_apple = reader(open_apple)
----> 4 list_apple = list(read_apple)

~\Anaconda3\lib\encodings\cp1252.py in decode(self, input, final)
21 class IncrementalDecoder(codecs.IncrementalDecoder):
22 def decode(self, input, final=False):
—> 23 return codecs.charmap_decode(input,self.errors,decoding_table)[0]
25 class StreamWriter(Codec,codecs.StreamWriter):

UnicodeDecodeError: ‘charmap’ codec can’t decode byte 0x81 in position 2693: character maps to

Hi @Samraty81

Welcome to our Dataquest Community.

Your problem is same as the problem in this link. Go through the below link.


It works.
Thank you!

1 Like