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 viaDataFrame.combine_first(existing values take precedence; the incoming file fills gaps). This is the parquet counterpart todiive.core.io.filereader.MultiDataFileReaderand shares itsprogress_callbackcontract.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 toload_parquet().sanitize_timestamp (
bool) – Forwarded toload_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 ascallback(phase, done, total, filepath)withphaseeither'reading'(before a file is read) or'done'(after it has been merged);doneis the count of finished files andtotalthe number of files.
- Return type:
- Returns:
The merged DataFrame.