Unicode Error while getting frame from .h5 file in python

405 views Asked by At

I'm trying to read a .h5 file using pandas.HDFStore

with this code:

import pandas as pd

store = pd.HDFStore('store.h5')

and it works, the problem happen when trying this line of code

df1 = store['df1']

and it returns this error:

"UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2108: ordinal not in range(128)"

I tried the solution in this link but it didn't work also.

So please help me to fix this error.

1

There are 1 answers

0
Vaishali On

There are different encoding and its usually difficult to find which one. try encoding= 'ISO-8859-1'