qis.append_time_series

qis.append_time_series(df_newer, df_older, numerical_check_columns=None)[source]

Append older history before newer data with newer values winning overlaps.

Parameters:
  • df_newer (DataFrame | Series) – Newer Series or DataFrame. Its Series name or DataFrame columns, axis names, column order, and declared dtypes define the result. Rows are interpreted in increasing index order without modifying the caller’s object. A zero-row object may still declare the result, but a DataFrame must contain at least one column.

  • df_older (DataFrame | Series) – Older object of the same pandas type. A Series is interpreted under the newer Series name. Nonempty DataFrame columns must be unique and a subset of the newer columns; missing newer columns remain missing in the historical prefix. A zero-row or zero-column older DataFrame is treated as unavailable. Rows are interpreted in increasing index order without modifying the caller’s object.

  • numerical_check_columns (List[str]) – Columns for which to return mean absolute differences over the aligned overlap after duplicate dates use the same stable keep-last selection as the returned splice. Labels must belong to the newer schema and their requested order is preserved. None skips the diagnostic.

Returns:

A chronologically ordered appended object matching the input pandas type, plus the optional overlap-difference Series. Newer values take precedence on shared dates; duplicate dates within a provider retain the last supplied observation. An unavailable provider returns an independently owned result under the newer declaration and no overlap diagnostic.

Raises:

ValueError – If the inputs have different pandas types, the newer DataFrame has no columns, either DataFrame has duplicate columns, older columns fall outside the newer schema, or a diagnostic label falls outside the newer schema.

Return type:

Tuple[DataFrame | Series, Series | None]