MCPcopy
hub / github.com/pandas-dev/pandas / __iter__

Method __iter__

pandas/core/arrays/categorical.py:2243–2250  ·  view source on GitHub ↗

Returns an Iterator over the values of this Categorical.

(self)

Source from the content-addressed store, hash-verified

2241 # ------------------------------------------------------------------
2242
2243 def __iter__(self) -> Iterator:
2244 """
2245 Returns an Iterator over the values of this Categorical.
2246 """
2247 if self.ndim == 1:
2248 return iter(self._internal_get_values().tolist())
2249 else:
2250 return (self[n] for n in range(len(self)))
2251
2252 def __contains__(self, key) -> bool:
2253 """

Callers

nothing calls this directly

Calls 2

_internal_get_valuesMethod · 0.95
tolistMethod · 0.45

Tested by

no test coverage detected