From 4bb00f27fb75145cddd1cb0a71a7457b511b6b75 Mon Sep 17 00:00:00 2001 From: Patrick Hoefler Date: Wed, 26 Apr 2023 22:56:52 +0200 Subject: [PATCH 1/2] DOC: Clean up for deprecations --- pandas/core/indexes/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index bb2355df4b303..9c57539b48eff 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -2536,7 +2536,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 ------- @@ -2589,7 +2589,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 ------- From 74b6356d2c729631d53751d7ae4b58c00fe3bba3 Mon Sep 17 00:00:00 2001 From: Patrick Hoefler <61934744+phofl@users.noreply.github.com> Date: Thu, 27 Apr 2023 14:33:50 +0200 Subject: [PATCH 2/2] Update base.py --- pandas/core/indexes/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 9c57539b48eff..75320a28eb16b 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -2536,7 +2536,7 @@ def is_categorical(self) -> bool: Check if the Index holds categorical data. .. deprecated:: 2.0.0 - Use `isinstance(index.dtype, pd.CategoricalDtype)`instead. + Use `isinstance(index.dtype, pd.CategoricalDtype)` instead. Returns -------