diff --git a/cf_xarray/groupers.py b/cf_xarray/groupers.py index 353d7829..8bc55ec3 100644 --- a/cf_xarray/groupers.py +++ b/cf_xarray/groupers.py @@ -7,6 +7,12 @@ @dataclass class FlagGrouper(UniqueGrouper): + """ + Grouper object that allows convenient categorical grouping by a CF flag variable. + + Labels in the grouped output will be restricted to those listed in ``flag_meanings``. + """ + def factorize(self, group) -> EncodedGroups: if "flag_values" not in group.attrs or "flag_meanings" not in group.attrs: raise ValueError( diff --git a/doc/api.rst b/doc/api.rst index bc88fc86..bc3d689b 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -21,8 +21,8 @@ Geometries ---------- .. autosummary:: :toctree: generated/ - geometry.decode_geometries + geometry.decode_geometries geometry.encode_geometries geometry.shapely_to_cf geometry.cf_to_shapely @@ -33,7 +33,8 @@ Groupers -------- .. autosummary:: :toctree: generated/ - groupers.FlagGrouper + + groupers.FlagGrouper .. currentmodule:: xarray