Last answered:

10 Aug 2022

Posted on:

21 Nov 2021

5

Cannot load the dataset as there is an error .

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

The error is shown above , this stops the loan_data.csv file from loading  . How to solve this , stackoverflow didnot have an apt answer .



"Course : Data preprocessing with Numpy , last section 2nd video "

3 answers ( 0 marked as helpful)
Posted on:

31 Jan 2022

1

Everyone has this error. Is this because of the improper data in the csv file or is it because of the delimiter?

I can see few places having double semi-colon in it.

Instructor
Posted on:

01 Feb 2022

10

Hi,
I do not have this issue myself, but others have reported that if you add an encoding parameter, it fixed the problem.
encoding = "unicode_escape"
or
encoding = "cp1252"

Either of those should work.
Best,
Nikola, 365 Team

Posted on:

10 Aug 2022

2

Hi,
I have that problem and I solved it using the solution suggested by Nikala Pulev. The problem is fixed using encoding = "unicode_escape".

Thank you for the solution.
BR,
Sofiane

Submit an answer