xarray.groupers.EncodedGroups#
- class xarray.groupers.EncodedGroups(codes, full_index, group_indices=None, unique_coord=None, coords=None)[source]#
Dataclass for storing intermediate values for GroupBy operation. Returned by the
factorize
method on Grouper objects.- codes#
Same shape as the DataArray to group by. Values consist of a unique integer code for each group.
- Type:
- full_index#
Pandas Index for the group coordinate containing unique group labels. This can differ from
unique_coord
in the case of resampling and binning, where certain groups in the output need not be present in the input.- Type:
- group_indices#
List of indices of array elements belonging to each group. Inferred if not provided.
- unique_coord#
Unique group values present in dataset. Inferred if not provided
- Type:
Variable
, optional
Methods
__init__
(codes, full_index[, group_indices, ...])Attributes
coords