diff --git a/dskit/io.py b/dskit/io.py index 8e8c9c7..412008c 100644 --- a/dskit/io.py +++ b/dskit/io.py @@ -29,7 +29,8 @@ def load(filepath): def read_folder(folder_path, file_type='csv'): """ - Loads multiple files from a folder and concatenates them. + Load multiple files from a folder and return + a list of pandas DataFrames. """ if not os.path.exists(folder_path): raise FileNotFoundError(f"The folder '{folder_path}' was not found.") @@ -47,7 +48,7 @@ def read_folder(folder_path, file_type='csv'): df_list.append(df) if df_list: - return pd.concat(df_list, ignore_index=True) + return df_list else: return None