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

Method __init__

pandas/plotting/_matplotlib/core.py:139–296  ·  view source on GitHub ↗
(
        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,
    )

Source from the content-addressed store, hash-verified

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

Callers 7

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 11

_get_nseriesMethod · 0.95
_validate_color_argsMethod · 0.95
_ensure_frameMethod · 0.95
is_numeric_dtypeFunction · 0.90
unpack_single_str_listFunction · 0.90
_validate_sharexMethod · 0.80
_parse_errorbarsMethod · 0.80
groupbyMethod · 0.45
_validate_log_kwdMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected