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.DataFrame into a pandas HDF5 FILE.


df : pandas.DataFrame

DataFrame 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 df will be saved in the hdf5_file.

mode : {‘w’,’a’}, optional

Mode to handle hdf5_file. This value is set to w by default, which stand for write.

complevel : int, optional

Level of compression for hdf5_file. The range of complevel is rane(0-9). This is set to a default of 8.