Skip to content

Commit 7ed0731

Browse files
Terji PetersenTerji Petersen
Terji Petersen
authored and
Terji Petersen
committed
use _holds_integer in plotting._atplotlib.core.py
1 parent 46c59a4 commit 7ed0731

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/plotting/_matplotlib/core.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ def __init__(self, data, x, y, s=None, c=None, **kwargs) -> None:
11941194
elif is_hashable(s) and s in data.columns:
11951195
s = data[s]
11961196
super().__init__(data, x, y, s=s, **kwargs)
1197-
if is_integer(c) and self.data.columns._should_fallback_to_positional:
1197+
if is_integer(c) and self.data.columns._holds_integer():
11981198
c = self.data.columns[c]
11991199
self.c = c
12001200

@@ -1286,7 +1286,7 @@ def _kind(self) -> Literal["hexbin"]:
12861286

12871287
def __init__(self, data, x, y, C=None, **kwargs) -> None:
12881288
super().__init__(data, x, y, **kwargs)
1289-
if is_integer(C) and self.data.columns._should_fallback_to_positional:
1289+
if is_integer(C) and self.data.columns._holds_integer():
12901290
C = self.data.columns[C]
12911291
self.C = C
12921292

0 commit comments

Comments
 (0)