ktk.TimeSeries.remove_data_info

ktk.TimeSeries.remove_data_info#

TimeSeries.remove_data_info(data_key, info_key, *, in_place=False)[source]#

Remove metadata from a TimeSeries’ data.

Parameters:
  • data_key (str) – The data key the info corresponds to.

  • info_key (str) – The key of the info dict.

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

Returns:

The TimeSeries with the removed data info.

Return type:

TimeSeries

Raises:

KeyError – If this data_info could not be found.

Example

>>> ts = ktk.TimeSeries()
>>> ts = ts.add_data_info("Forces", "Unit", "N")
>>> ts.data_info["Forces"]
{'Unit': 'N'}
>>> ts = ts.remove_data_info("Forces", "Unit")
>>> ts.data_info["Forces"]
{}