pandas_df_to_hdf5_file¶
-
cosmo_utils.utils.file_readers.pandas_df_to_hdf5_file(df, hdf5_file, key=None, mode='w', complevel=8)[source] [edit on github]¶ Saves a
pandas.DataFrameinto apandasHDF5 FILE.Parameters: df :
pandas.DataFrameDataFrame to be converted and saved into a HDF5 file.
hdf5_file : str
Path to the output HDF5 file
key : str or NoneType, optional
Key or path, under which
dfwill be saved in thehdf5_file.mode : {‘w’,’a’}, optional
Mode to handle
hdf5_file. This value is set towby default, which stand forwrite.complevel : int, optional
Level of compression for
hdf5_file. The range ofcomplevelis rane(0-9). This is set to a default of 8.