Skip to content

Commit 0fce7d7

Browse files
committed
Update
1 parent f3e8b2b commit 0fce7d7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

doc/source/whatsnew/v2.0.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,8 @@ Other API changes
492492

493493
Deprecations
494494
~~~~~~~~~~~~
495-
- :meth:`Index.is_object` has been deprecated. Use :func:`pandas.api.types.is_object_dtype` instead (:issue:`50042`)
496495
- Deprecated argument ``infer_datetime_format`` in :func:`to_datetime` and :func:`read_csv`, as a strict version of it is now the default (:issue:`48621`)
496+
- :meth:`Index.is_object` has been deprecated. Use :func:`pandas.api.types.is_object_dtype` instead (:issue:`50042`)
497497

498498
.. ---------------------------------------------------------------------------
499499

pandas/core/indexes/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,6 +2347,7 @@ def is_numeric(self) -> bool:
23472347
def is_object(self) -> bool:
23482348
"""
23492349
Check if the Index is of the object dtype.
2350+
23502351
.. deprecated:: 2.0.0
23512352
Use `pandas.api.types.is_object_dtype` instead.
23522353
@@ -2383,14 +2384,12 @@ def is_object(self) -> bool:
23832384
>>> idx.is_object()
23842385
False
23852386
"""
2386-
23872387
warnings.warn(
23882388
f"{type(self).__name__}.is_object is deprecated."
23892389
"Use pandas.api.types.is_object_dtype instead",
23902390
FutureWarning,
23912391
stacklevel=find_stack_level(),
23922392
)
2393-
23942393
return is_object_dtype(self.dtype)
23952394

23962395
@final

0 commit comments

Comments
 (0)