| 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 |