diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index e8969e90e6318..890ac084680a1 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -2521,7 +2521,7 @@ def is_categorical(self) -> bool: Check if the Index holds categorical data. .. deprecated:: 2.0.0 - Use :meth:`pandas.api.types.is_categorical_dtype` instead. + Use `isinstance(index.dtype, pd.CategoricalDtype)` instead. Returns ------- @@ -2574,7 +2574,7 @@ def is_interval(self) -> bool: Check if the Index holds Interval objects. .. deprecated:: 2.0.0 - Use `pandas.api.types.is_interval_dtype` instead. + Use `isinstance(index.dtype, pd.IntervalDtype)` instead. Returns -------