diff --git a/doc/redirects.csv b/doc/redirects.csv index c11e4e242f128..2d72dbca8816f 100644 --- a/doc/redirects.csv +++ b/doc/redirects.csv @@ -643,7 +643,6 @@ generated/pandas.Index.get_slice_bound,../reference/api/pandas.Index.get_slice_b generated/pandas.Index.groupby,../reference/api/pandas.Index.groupby generated/pandas.Index.has_duplicates,../reference/api/pandas.Index.has_duplicates generated/pandas.Index.hasnans,../reference/api/pandas.Index.hasnans -generated/pandas.Index.holds_integer,../reference/api/pandas.Index.holds_integer generated/pandas.Index,../reference/api/pandas.Index generated/pandas.Index.identical,../reference/api/pandas.Index.identical generated/pandas.Index.inferred_type,../reference/api/pandas.Index.inferred_type diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 9670b5439c87e..f16323e0337bf 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -46,7 +46,7 @@ def holds_integer(column: Index) -> bool: - return column.inferred_type in {"integer", "mixed-integer"} + return column.dtype.kind in "iu" def hist_series( diff --git a/pandas/plotting/_matplotlib/core.py b/pandas/plotting/_matplotlib/core.py index 1c7e1ab57b2a9..a7944ba301e68 100644 --- a/pandas/plotting/_matplotlib/core.py +++ b/pandas/plotting/_matplotlib/core.py @@ -101,7 +101,7 @@ def holds_integer(column: Index) -> bool: - return column.inferred_type in {"integer", "mixed-integer"} + return column.dtype.kind in "iu" def _color_in_style(style: str) -> bool: