zcollection.merging.time_series.merge_time_series#
- zcollection.merging.time_series.merge_time_series(existing_ds, inserted_ds, axis, partitioning_dim, **kwargs)[source]#
Merge two time series together.
Replaces only the intersection between the existing dataset and the new one, but also keeps the existing records if they have not been updated.
The following figure illustrates the implemented algorithm. Column
A
represents the new data and columnB
, the data already present. The different cells in the columns represent the hours on the day of the measurements. The merge result is shown in columnC
. It contains the measurements of the columnA
or columnB
if columnA
does not replace them.- Parameters:
existing_ds (Dataset) – The existing dataset.
inserted_ds (Dataset) – The inserted dataset.
axis (str) – The axis to merge on.
partitioning_dim (str) – The name of the partitioning dimension.
kwargs –
- tolerance: This parameter sets the tolerance level for detecting
data gaps in the inserted axis dataset. If set to
None
, the algorithm will not check for data gaps in the inserted dataset.
- Returns:
The merged dataset.
- Return type: