Skip to content

Commit 7390f8e

Browse files
phoflmeeseeksmachine
authored andcommitted
Backport PR pandas-dev#57490: DOC: Add a few deprecation notes
1 parent dfc66f6 commit 7390f8e

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
@@ -169,6 +169,9 @@ def is_sparse(arr) -> bool:
169169
"""
170170
Check whether an array-like is a 1-D pandas sparse array.
171171
172+
.. deprecated:: 2.1.0
173+
Use isinstance(dtype, pd.SparseDtype) instead.
174+
172175
Check that the one-dimensional array-like is a pandas sparse array.
173176
Returns True if it is a pandas sparse array, not another type of
174177
sparse array.
@@ -295,6 +298,9 @@ def is_datetime64tz_dtype(arr_or_dtype) -> bool:
295298
"""
296299
Check whether an array-like or dtype is of a DatetimeTZDtype dtype.
297300
301+
.. deprecated:: 2.1.0
302+
Use isinstance(dtype, pd.DatetimeTZDtype) instead.
303+
298304
Parameters
299305
----------
300306
arr_or_dtype : array-like or dtype
@@ -381,6 +387,9 @@ def is_period_dtype(arr_or_dtype) -> bool:
381387
"""
382388
Check whether an array-like or dtype is of the Period dtype.
383389
390+
.. deprecated:: 2.2.0
391+
Use isinstance(dtype, pd.Period) instead.
392+
384393
Parameters
385394
----------
386395
arr_or_dtype : array-like or dtype
@@ -424,6 +433,9 @@ def is_interval_dtype(arr_or_dtype) -> bool:
424433
"""
425434
Check whether an array-like or dtype is of the Interval dtype.
426435
436+
.. deprecated:: 2.2.0
437+
Use isinstance(dtype, pd.IntervalDtype) instead.
438+
427439
Parameters
428440
----------
429441
arr_or_dtype : array-like or dtype
@@ -470,6 +482,9 @@ def is_categorical_dtype(arr_or_dtype) -> bool:
470482
"""
471483
Check whether an array-like or dtype is of the Categorical dtype.
472484
485+
.. deprecated:: 2.2.0
486+
Use isinstance(dtype, pd.CategoricalDtype) instead.
487+
473488
Parameters
474489
----------
475490
arr_or_dtype : array-like or dtype

0 commit comments

Comments
 (0)