Skip to content

Commit 12d3232

Browse files
phoflim-vinicius
authored and
im-vinicius
committed
DOC: Clean up for deprecations (pandas-dev#52949)
1 parent 8be69a4 commit 12d3232

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/indexes/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2545,7 +2545,7 @@ def is_categorical(self) -> bool:
25452545
Check if the Index holds categorical data.
25462546
25472547
.. deprecated:: 2.0.0
2548-
Use :meth:`pandas.api.types.is_categorical_dtype` instead.
2548+
Use `isinstance(index.dtype, pd.CategoricalDtype)` instead.
25492549
25502550
Returns
25512551
-------
@@ -2598,7 +2598,7 @@ def is_interval(self) -> bool:
25982598
Check if the Index holds Interval objects.
25992599
26002600
.. deprecated:: 2.0.0
2601-
Use `pandas.api.types.is_interval_dtype` instead.
2601+
Use `isinstance(index.dtype, pd.IntervalDtype)` instead.
26022602
26032603
Returns
26042604
-------

0 commit comments

Comments
 (0)