Skip to content

Commit a6ec4af

Browse files
phofllithomas1pre-commit-ci[bot]
authored andcommitted
DOC: Add a few deprecation notes (pandas-dev#57490)
* DOC: Add a few deprecation notes * Update common.py * Update common.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Thomas Li <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent fc799b3 commit a6ec4af

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pandas/core/dtypes/common.py

+15
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ def is_sparse(arr) -> bool:
168168
"""
169169
Check whether an array-like is a 1-D pandas sparse array.
170170
171+
.. deprecated:: 2.1.0
172+
Use isinstance(dtype, pd.SparseDtype) instead.
173+
171174
Check that the one-dimensional array-like is a pandas sparse array.
172175
Returns True if it is a pandas sparse array, not another type of
173176
sparse array.
@@ -294,6 +297,9 @@ def is_datetime64tz_dtype(arr_or_dtype) -> bool:
294297
"""
295298
Check whether an array-like or dtype is of a DatetimeTZDtype dtype.
296299
300+
.. deprecated:: 2.1.0
301+
Use isinstance(dtype, pd.DatetimeTZDtype) instead.
302+
297303
Parameters
298304
----------
299305
arr_or_dtype : array-like or dtype
@@ -380,6 +386,9 @@ def is_period_dtype(arr_or_dtype) -> bool:
380386
"""
381387
Check whether an array-like or dtype is of the Period dtype.
382388
389+
.. deprecated:: 2.2.0
390+
Use isinstance(dtype, pd.Period) instead.
391+
383392
Parameters
384393
----------
385394
arr_or_dtype : array-like or dtype
@@ -423,6 +432,9 @@ def is_interval_dtype(arr_or_dtype) -> bool:
423432
"""
424433
Check whether an array-like or dtype is of the Interval dtype.
425434
435+
.. deprecated:: 2.2.0
436+
Use isinstance(dtype, pd.IntervalDtype) instead.
437+
426438
Parameters
427439
----------
428440
arr_or_dtype : array-like or dtype
@@ -469,6 +481,9 @@ def is_categorical_dtype(arr_or_dtype) -> bool:
469481
"""
470482
Check whether an array-like or dtype is of the Categorical dtype.
471483
484+
.. deprecated:: 2.2.0
485+
Use isinstance(dtype, pd.CategoricalDtype) instead.
486+
472487
Parameters
473488
----------
474489
arr_or_dtype : array-like or dtype

0 commit comments

Comments
 (0)