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

Method __init__

pandas/plotting/_matplotlib/core.py:2132–2139  ·  view source on GitHub ↗
(self, data: Series | DataFrame, kind=None, **kwargs)

Source from the content-addressed store, hash-verified

2130 _layout_type = "horizontal"
2131
2132 def __init__(self, data: Series | DataFrame, kind=None, **kwargs) -> None:
2133 data = data.fillna(value=0)
2134 lt_zero = data < 0
2135 if isinstance(data, ABCDataFrame) and lt_zero.any().any():
2136 raise ValueError(f"{self._kind} plot doesn't allow negative values")
2137 elif isinstance(data, ABCSeries) and lt_zero.any():
2138 raise ValueError(f"{self._kind} plot doesn't allow negative values")
2139 MPLPlot.__init__(self, data, kind=kind, **kwargs)
2140
2141 @classmethod
2142 def _validate_log_kwd(

Callers

nothing calls this directly

Calls 3

fillnaMethod · 0.45
anyMethod · 0.45
__init__Method · 0.45

Tested by

no test coverage detected