(
self,
data,
kind=None,
by: IndexLabel | None = None,
subplots: bool | Sequence[Sequence[str]] = False,
sharex: bool | None = None,
sharey: bool = False,
use_index: bool = True,
figsize: tuple[float, float] | None = None,
grid=None,
legend: bool | str = True,
rot=None,
ax=None,
fig=None,
title=None,
xlim=None,
ylim=None,
xticks=None,
yticks=None,
xlabel: Hashable | None = None,
ylabel: Hashable | None = None,
fontsize: int | None = None,
secondary_y: bool | tuple | list | np.ndarray = False,
colormap=None,
table: bool = False,
layout=None,
include_bool: bool = False,
column: IndexLabel | None = None,
*,
logx: bool | None | Literal["sym"] = False,
logy: bool | None | Literal["sym"] = False,
loglog: bool | None | Literal["sym"] = False,
mark_right: bool = True,
stacked: bool = False,
label: Hashable | None = None,
style=None,
**kwds,
)
| 137 | data: DataFrame |
| 138 | |
| 139 | def __init__( |
| 140 | self, |
| 141 | data, |
| 142 | kind=None, |
| 143 | by: IndexLabel | None = None, |
| 144 | subplots: bool | Sequence[Sequence[str]] = False, |
| 145 | sharex: bool | None = None, |
| 146 | sharey: bool = False, |
| 147 | use_index: bool = True, |
| 148 | figsize: tuple[float, float] | None = None, |
| 149 | grid=None, |
| 150 | legend: bool | str = True, |
| 151 | rot=None, |
| 152 | ax=None, |
| 153 | fig=None, |
| 154 | title=None, |
| 155 | xlim=None, |
| 156 | ylim=None, |
| 157 | xticks=None, |
| 158 | yticks=None, |
| 159 | xlabel: Hashable | None = None, |
| 160 | ylabel: Hashable | None = None, |
| 161 | fontsize: int | None = None, |
| 162 | secondary_y: bool | tuple | list | np.ndarray = False, |
| 163 | colormap=None, |
| 164 | table: bool = False, |
| 165 | layout=None, |
| 166 | include_bool: bool = False, |
| 167 | column: IndexLabel | None = None, |
| 168 | *, |
| 169 | logx: bool | None | Literal["sym"] = False, |
| 170 | logy: bool | None | Literal["sym"] = False, |
| 171 | loglog: bool | None | Literal["sym"] = False, |
| 172 | mark_right: bool = True, |
| 173 | stacked: bool = False, |
| 174 | label: Hashable | None = None, |
| 175 | style=None, |
| 176 | **kwds, |
| 177 | ) -> None: |
| 178 | # if users assign an empty list or tuple, raise `ValueError` |
| 179 | # similar to current `df.box` and `df.hist` APIs. |
| 180 | if by in ([], ()): |
| 181 | raise ValueError("No group keys passed!") |
| 182 | self.by = com.maybe_make_list(by) |
| 183 | |
| 184 | # Assign the rest of columns into self.columns if by is explicitly defined |
| 185 | # while column is not, only need `columns` in hist/box plot when it's DF |
| 186 | # TODO: Might deprecate `column` argument in future PR (#28373) |
| 187 | if isinstance(data, ABCDataFrame): |
| 188 | if column: |
| 189 | self.columns = com.maybe_make_list(column) |
| 190 | elif self.by is None: |
| 191 | self.columns = [ |
| 192 | col for col in data.columns if is_numeric_dtype(data[col]) |
| 193 | ] |
| 194 | else: |
| 195 | self.columns = [ |
| 196 | col |
no test coverage detected