diive.load_parquet_many

diive.load_parquet_many(filepaths, output_middle_timestamp=True, sanitize_timestamp=True, progress_callback=None)[source]

Load several parquet files and merge them into one DataFrame.

Each file is read with load_parquet() and merged with the running result via DataFrame.combine_first (existing values take precedence; the incoming file fills gaps). This is the parquet counterpart to diive.core.io.filereader.MultiDataFileReader and shares its progress_callback contract.

With sanitize_timestamp=True, the merged data are put on a regular time grid when the files leave a time gap between them: missing timestamps are added as empty (NaN) records. Records that are not on the grid (for example from a file with a different time resolution) are removed, with a warning that gives their number.

Parameters:
  • filepaths (list) – Parquet file paths to read and merge, in order.

  • output_middle_timestamp (bool) – Forwarded to load_parquet().

  • sanitize_timestamp (bool) – Forwarded to load_parquet().

  • progress_callback (Optional[Callable[[str, int, int, object], None]]) – Optional callable invoked while merging so callers (e.g. a GUI) can report per-file progress. Called as callback(phase, done, total, filepath) with phase either 'reading' (before a file is read) or 'done' (after it has been merged); done is the count of finished files and total the number of files.

Return type:

DataFrame

Returns:

The merged DataFrame.