pandas21 hdf文件读写简要( tcy)

hdf文件读写 2018/12/27

import tables

df=pd.DataFrame({'No':[1001,1002,1003],'Name':['Tom','Bob','Jim'],'Weight':[20,30,40]})

df.to_hdf('foo.h5','df')
pd.read_hdf('foo.h5','df')
     No   Name  Weight
0  1001  Tom        20
1  1002  Bob        30
2  1003  Jim        40 

猜你喜欢

转载自blog.csdn.net/tcy23456/article/details/85294299