close

[Solved] Pandas read _excel: ‘utf-8’ codec can’t decode byte 0xa8 in position 14: invalid start byte

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Pandas read _excel: ‘utf-8’ codec can’t decode byte 0xa8 in position 14: invalid start byte in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Pandas read _excel: ‘utf-8’ codec can’t decode byte 0xa8 in position 14: invalid start byte Error Occurs?

Today I get the following error Pandas read _excel: ‘utf-8’ codec can’t decode byte 0xa8 in position 14: invalid start byte in python.

How To Solve Pandas read _excel: ‘utf-8’ codec can’t decode byte 0xa8 in position 14: invalid start byte Error ?

  1. How To Solve Pandas read _excel: 'utf-8' codec can't decode byte 0xa8 in position 14: invalid start byte Error ?

    To Solve Pandas read _excel: 'utf-8' codec can't decode byte 0xa8 in position 14: invalid start byte Error The problem is that the original requester is calling read_excel with a filehandle as the first argument. As demonstrated by the last responder, the first argument should be a string containing the filename.

  2. Pandas read _excel: 'utf-8' codec can't decode byte 0xa8 in position 14: invalid start byte

    To Solve Pandas read _excel: 'utf-8' codec can't decode byte 0xa8 in position 14: invalid start byte Error The problem is that the original requester is calling read_excel with a filehandle as the first argument. As demonstrated by the last responder, the first argument should be a string containing the filename.

Solution 1

Most probably the problem is in Russian symbols.

Charmap is default decoding method used in case no encoding is beeing noticed.

As I see if utf-8 and latin-1 do not help then try to read this file not as

pd.read_excel(f)

but

pd.read_table(f)

or even just

f.readline()

in order to check what is a symbol raise an exeception and delete this symbol/symbols.

Solution 2

The problem is that the original requester is calling read_excel with a filehandle as the first argument. As demonstrated by the last responder, the first argument should be a string containing the filename.

I ran into this same error using:

df = pd.read_excel(open("file.xlsx",'r'))

but correct is:

df = pd.read_excel("file.xlsx")

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read