根据https://stackoverflow.com/a/46206376/11578009,我正在尝试附加HDFStore文件
import pandas as pd
hdfStore = pd.HDFStore('dataframe.h5')
#df=
#a b c d f
#0 125 -6.450 ... 0 2020-04-#16T02:30:00
#2 124 -6.403 ... 0 2020-04-#16T02:30:00
#4 128 -6.403 ... 0 2020-04-#16T02:30:00
#
#[3 rows x 5 columns]
hdfStore.append('df', df, format='t',data_columns=True )正在尝试将此df附加到hdfStore抛出:
TypeError: object of type 'int' has no len()发布于 2020-04-16 21:28:15
当我复制错误的时候,我找到了答案,但也许它对某人有用。
当使用的pd.DataFrame中的数据类型为
df.dtypes
Out[65]:
time_diffrences int64
temp_diffrences int64
label object
dtype: object例如,对于整型,dtype不能是'object‘
https://stackoverflow.com/questions/61251379
复制相似问题