def write_hdf(hdf_fname, df, key, header):
"""
Output the contents of *df* and *header* to the HDF file
*hdf_fname* under identifier *key*.
"""
with PD.HDFStore(hdf_fname) as store:
store.put(key, df)
store.get_storer(key).attrs.header = header
return hdf_fname
评论列表
文章目录