更新时间:2022-12-08 11:00:55
您需要指定data_columns=
(也可以使用True
使所有列都可搜索)
You need to specify data_columns=
(you can use True
as well to make all columns searchable)
(仅供参考,mode='w'
将重新开始文件,仅以我为例)
(FYI, the mode='w'
will start the file over, and is just for my example)
In [50]: df_tl.to_hdf('STORAGE2.h5','table',append=True,mode='w',data_columns=['A'])
In [51]: pd.read_hdf('STORAGE2.h5','table',where='A>2')
Out[51]:
A B
3 3 3
4 4 4