UnicodeDecodeError utf-8 codec can t decode byte 0xba in position 16 invalid start byte

0 votes

Hi Guys,

I am trying to read one CSV file in my jupyter notebook using pandas, but it shows me Unicode error

How can I solve this error?

Thank You

Apr 9, 2020 in Python by akhtar
• 38,230 points
15,569 views

2 answers to this question.

0 votes

Hi@akhtar,

This type of error will occur, if there are any problem to decode any value. To avoid this you can follow the below given code.

import pandas as pd
dataset = pd.read_csv('csv_file', encoding='ISO-8859–1')

Hope this will help.

Thank You

answered Apr 9, 2020 by MD
• 95,440 points
Thank you dude!
Saved Me! Thank You :)
Thanks, it helps me.
Hi, @guys,

Thank you for your contribution to the Edureka Community.

Register/Sign up on the community to gain points for further contributions. You may ask questions, answer, upvote, and downvote an answer. Each of these would fetch you points and you could be among the top contributors and win exciting merchandise from Edureka.

Cheers!
0 votes
Thanks, This answer was helpful.
answered Jul 11, 2020 by Prashant Chhatrashali

Related Questions In Python

+2 votes
2 answers

UnicodeDecodeError: "utf-8" codec can't decode byte in position : invalid start byte

You have to use the encoding as latin1 ...READ MORE

answered Jul 23, 2019 in Python by Kunal
241,555 views
0 votes
1 answer

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

Hi, @hala, Regarding your query, you can go ...READ MORE

answered Jun 29, 2020 in Python by Niroj
• 82,880 points
16,949 views
+4 votes
4 answers
0 votes
0 answers

utf-8' codec can't decode byte 0xa0 in position 10: invalid start byte

my code import wordcloud import numpy as np from matplotlib ...READ MORE

Mar 29, 2020 in Python by anonymous
• 120 points
4,980 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,023 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
3,409 views
0 votes
1 answer

'utf-8' codec can't decode byte 0x82 in position 16: invalid start byte

Hi@zena, The error is because there is some non-ASCII ...READ MORE

answered Jun 29, 2020 in Python by MD
• 95,440 points
14,604 views
0 votes
2 answers

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

Hey,  @Himanshu. It's still most likely gzipped data. ...READ MORE

answered Jul 27, 2020 in Python by Gitika
• 65,910 points
23,159 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP