concatenate_pd_df¶
-
cosmo_utils.utils.file_readers.
concatenate_pd_df
(directory, filetype='hdf5', foutput=None, outonly=True)[source] [edit on github]¶ Concatenates pandas DataFrames into a single DataFrame
Parameters: directory : str
Path to the folder containing multiple pandas-HDF5 files
filetype : str, optional
File format of the file in
directory
to be read This is set tohdf5
by default.foutput : str or NoneType
If not
None
, it is the basename of the output file in HDF5 formatoutonly :
bool
, optionalIf True, it returns the pandas DataFrame. If False, it only saved the concatenated
pandas.DataFrame
.Returns: df_conc :
pandas.DataFrame
DataFrame containing the combined datasets from the files in
directory
.Raises: LSSUtils_Error : Exception
If no files are found in
directory
, it raises an error warning about this.