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

Method _get_nseries

pandas/plotting/_matplotlib/core.py:497–507  ·  view source on GitHub ↗
(self, data: Series | DataFrame)

Source from the content-addressed store, hash-verified

495 yield col, np.asarray(values.values)
496
497 def _get_nseries(self, data: Series | DataFrame) -> int:
498 # When `by` is explicitly assigned, grouped data size will be defined, and
499 # this will determine number of subplots to have, aka `self.nseries`
500 if data.ndim == 1:
501 return 1
502 elif self.by is not None and self._kind == "hist":
503 return len(self._grouped)
504 elif self.by is not None and self._kind == "box":
505 return len(self.columns)
506 else:
507 return data.shape[1]
508
509 @final
510 @property

Callers 2

__init__Method · 0.95
nseriesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected