read_pandas_hdf5¶
-
cosmo_utils.utils.file_readers.
read_pandas_hdf5
(hdf5_file, key=None, ret=False)[source] [edit on github]¶ Reads a HDF5 file that contains one or many datasets. It converts it into a pandas DataFrame.
Parameters: hdf5_file : str
Path to the HDF5 file containing one or more pandas DataFrame(s).
key : str or NoneType
If provided, it will extract the
key
value as a pandas DataFrame. This value is set toNone
by default.ret :
bool
, optionalIf True, it returns the value of the
key
. By default, it is set to False.Returns: df :
pandas.DataFrame
DataFrame from the
hdf5_file
with the data from thekey
directory