neuniversity / ALY6140

1 stars 3 forks source link

Error regarding extracting dataset #31

Open ShailuKonda opened 5 years ago

ShailuKonda commented 5 years ago

I tried changing the link for the data set the previous error has gone. But I got a new error as "'utf-8' codec can't decode byte 0xe9 in position 22: invalid continuation byte ". I donno what this is. Can anyone help me.

aanranran commented 5 years ago

I have the same problem in my capstone too! I have done some researches on it already. It tells me that "read_csv" takes an encoding option to deal with files in different formats. you can use read_csv('file', encoding = "ISO-8859-1"), or alternatively encoding = "utf-8" for reading. Although my problem cannot be solved by this code, hope it will be applied to you!

And you can check the following website which could be helpful as well! https://stackoverflow.com/questions/18171739/unicodedecodeerror-when-reading-csv-file-in-pandas-with-python

pr24 commented 5 years ago

Kindly put the encoding='latin-1' after url -> pd.read_csv(url,encoding='latin-1').

ShailuKonda commented 5 years ago

Yes, I used encoding='latin-1'. My code is working and now I can able to extract the data set. Thankyou all