TimeSeries.merge(ts, data_keys=[], *, resample=False, overwrite=False, in_place=False)[source]#

Merge the TimeSeries with another TimeSeries.

  • ts (TimeSeries) – The TimeSeries to merge into the current TimeSeries.

  • data_keys (str | list[str]) – Optional. The data keys to merge from ts. If left empty, all the data keys are merged.

  • resample (bool) – Optional. Set to True to resample the source TimeSeries to the target one using a linear interpolation. If the time vectors are not equivalent and resample is False, an exception is raised. To resample using other methods than linear interpolation, please resample the source TimeSeries manually before, using TimeSeries.resample. Default is False.

  • overwrite (bool) – Optional. If duplicates data keys are found and overwrite is True, then the source (ts) overwrites the destination. Otherwise (overwrite is False), the duplicate data in ts is ignored. Default is False.

  • in_place (bool) – Optional. True to modify and return the original TimeSeries. False to return a modified copy of the TimeSeries while leaving the original TimeSeries intact. Default is False.


The merged TimeSeries.

Return type



  • All events are also merged from both TimeSeries.