|
27 | 27 | from pandas.util._exceptions import find_stack_level
|
28 | 28 |
|
29 | 29 | from pandas.core.dtypes.common import (
|
| 30 | + holds_integer, |
30 | 31 | is_categorical_dtype,
|
31 | 32 | is_extension_array_dtype,
|
32 | 33 | is_float,
|
@@ -1135,9 +1136,9 @@ def __init__(self, data, x, y, **kwargs) -> None:
|
1135 | 1136 | MPLPlot.__init__(self, data, **kwargs)
|
1136 | 1137 | if x is None or y is None:
|
1137 | 1138 | raise ValueError(self._kind + " requires an x and y column")
|
1138 |
| - if is_integer(x) and not self.data.columns.holds_integer(): |
| 1139 | + if is_integer(x) and not holds_integer(self.data.columns): |
1139 | 1140 | x = self.data.columns[x]
|
1140 |
| - if is_integer(y) and not self.data.columns.holds_integer(): |
| 1141 | + if is_integer(y) and not holds_integer(self.data.columns): |
1141 | 1142 | y = self.data.columns[y]
|
1142 | 1143 |
|
1143 | 1144 | # Scatter plot allows to plot objects data
|
@@ -1194,7 +1195,7 @@ def __init__(self, data, x, y, s=None, c=None, **kwargs) -> None:
|
1194 | 1195 | elif is_hashable(s) and s in data.columns:
|
1195 | 1196 | s = data[s]
|
1196 | 1197 | super().__init__(data, x, y, s=s, **kwargs)
|
1197 |
| - if is_integer(c) and not self.data.columns.holds_integer(): |
| 1198 | + if is_integer(c) and not holds_integer(self.data.columns.holds): |
1198 | 1199 | c = self.data.columns[c]
|
1199 | 1200 | self.c = c
|
1200 | 1201 |
|
@@ -1286,7 +1287,7 @@ def _kind(self) -> Literal["hexbin"]:
|
1286 | 1287 |
|
1287 | 1288 | def __init__(self, data, x, y, C=None, **kwargs) -> None:
|
1288 | 1289 | super().__init__(data, x, y, **kwargs)
|
1289 |
| - if is_integer(C) and not self.data.columns.holds_integer(): |
| 1290 | + if is_integer(C) and not holds_integer(self.data.columns): |
1290 | 1291 | C = self.data.columns[C]
|
1291 | 1292 | self.C = C
|
1292 | 1293 |
|
|
0 commit comments