0

I try to load data, but I get this error message:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfe in position 341: invalid start byte

Does anyone know what I can do? numpy version: '1.19.2'

Code:

>>> raw_data_np = np.genfromtxt("loan-data.csv", delimiter = ';', skip_header = 1, autostrip = True)

>>> raw_data_np
snakecharmerb
  • 47,570
  • 11
  • 100
  • 153
Jbum
  • 1
  • 2
  • 1
    You are reading a textual file, assuming that it is saved as utf-8, but it is not a valid utf-8 file. You should find out in which encoding it was saved and use the `encoding` argument of `genfromtxt` to specify the correct encoding. – zvone Jan 15 '21 at 15:15
  • https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text – DisappointedByUnaccountableMod Jan 15 '21 at 15:53

0 Answers0