pyacs.gts.lib.primitive.insert_ts module

pyacs.gts.lib.primitive.insert_ts.insert_ts(self, ts, rounding='day', data='xyz', overlap=True)[source]

Insert another Gts into this one (merge or overwrite over its period).

Parameters:
  • ts (Gts) – Gts to be inserted.

  • rounding (str, optional) – Date rounding for deciding whether an entry is replaced: ‘second’, ‘minute’, ‘hour’, ‘day’.

  • data (str or None, optional) – Attribute to update: ‘xyz’ for .data_xyz or None for .data.

  • overlap (bool, optional) – If True, update only on matching dates; if False, ts overwrites current Gts over ts period.

Returns:

New Gts. .data or .data_xyz is set to None according to the data argument.

Return type:

Gts