semantique.processor.utils.parse_datetime_component#
- semantique.processor.utils.parse_datetime_component(name, obj)[source]#
Parse datetime accessor arrays.
The datetime accessors of
xarray.DataArrayobjects are treated in semantique as a component of the temporal dimension. Parsing them includes addingvalue_typeandvalue_labelproperties 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.