Skip to content

Commit b56c6ce

Browse files
Backport PR #52949 on branch 2.0.x (DOC: Clean up for deprecations) (#52962)
Backport PR #52949: DOC: Clean up for deprecations Co-authored-by: Patrick Hoefler <[email protected]>
1 parent 79abb44 commit b56c6ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/indexes/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2521,7 +2521,7 @@ def is_categorical(self) -> bool:
25212521
Check if the Index holds categorical data.
25222522
25232523
.. deprecated:: 2.0.0
2524-
Use :meth:`pandas.api.types.is_categorical_dtype` instead.
2524+
Use `isinstance(index.dtype, pd.CategoricalDtype)` instead.
25252525
25262526
Returns
25272527
-------
@@ -2574,7 +2574,7 @@ def is_interval(self) -> bool:
25742574
Check if the Index holds Interval objects.
25752575
25762576
.. deprecated:: 2.0.0
2577-
Use `pandas.api.types.is_interval_dtype` instead.
2577+
Use `isinstance(index.dtype, pd.IntervalDtype)` instead.
25782578
25792579
Returns
25802580
-------

0 commit comments

Comments
 (0)