semantique.processor.utils.parse_datetime_component

semantique.processor.utils.parse_datetime_component#

semantique.processor.utils.parse_datetime_component(name, obj)[source]#

Parse datetime accessor arrays.

The datetime accessors of xarray.DataArray objects are treated in semantique as a component of the temporal dimension. Parsing them includes adding value_type and value_label properties as well as in some cases re-organize the values in the array.

Parameters:
  • name (str) – Name of the datetime component.

  • obj (xarray.DataArray) – Xarray datetime accessor.

Returns:

xarray.DataArray – Parsed datetime accessor.