简体   繁体   中英

Unicode Error while getting frame from .h5 file in python

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM