Pandas solves the abnormal problem when saving H5 files

Code:

#保存h5文件
#指定文件路径和读写模式
hd=pd.HDFStore('mystock.h5','w')
#将my的数据存入到hd中
hd['data']=my
#关闭文件
hd.close()

An exception occurs:

 Reason: Missing pytables

 solve:

Execute the command pip install tables.
After installation, restart the jupyter kernel and run the code again!

 

 

Guess you like

Origin blog.csdn.net/hlx20080808/article/details/131299614