MCPcopy Index your code
hub / github.com/pydata/xarray / __repr__

Method __repr__

xarray/core/groupby.py:851–864  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

849 return zip(self.encoded.unique_coord.data, self._iter_grouped(), strict=True)
850
851 def __repr__(self) -> str:
852 text = (
853 f"<{self.__class__.__name__}, "
854 f"grouped over {len(self.groupers)} grouper(s),"
855 f" {self._len} groups in total:"
856 )
857 for grouper in self.groupers:
858 coord = grouper.unique_coord
859 labels = ", ".join(format_array_flat(coord, 30).split())
860 text += (
861 f"\n {grouper.name!r}: {type(grouper.grouper).__name__}({grouper.group.name!r}), "
862 f"{coord.size}/{grouper.full_index.size} groups with labels {labels}"
863 )
864 return text + ">"
865
866 def _iter_grouped(self) -> Iterator[T_Xarray]:
867 """Iterate over each element in this group"""

Callers

nothing calls this directly

Calls 4

format_array_flatFunction · 0.90
typeFunction · 0.85
splitMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected