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,170 points
4,479 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,060 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 10, 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
86,952 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,560 points
3,984 views
+2 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
1,986 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 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,830 views
0 votes
0 answers
+4 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,810 points
1,413 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,060 points
1,453 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,870 points
2,708 views