Skip to content

Commit

Permalink
Backport PR pandas-dev#57490: DOC: Add a few deprecation notes
Browse files Browse the repository at this point in the history
  • Loading branch information
phofl authored and meeseeksmachine committed Feb 19, 2024
1 parent dfc66f6 commit 7390f8e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pandas/core/dtypes/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ def is_sparse(arr) -> bool:
"""
Check whether an array-like is a 1-D pandas sparse array.
.. deprecated:: 2.1.0
Use isinstance(dtype, pd.SparseDtype) instead.
Check that the one-dimensional array-like is a pandas sparse array.
Returns True if it is a pandas sparse array, not another type of
sparse array.
Expand Down Expand Up @@ -295,6 +298,9 @@ def is_datetime64tz_dtype(arr_or_dtype) -> bool:
"""
Check whether an array-like or dtype is of a DatetimeTZDtype dtype.
.. deprecated:: 2.1.0
Use isinstance(dtype, pd.DatetimeTZDtype) instead.
Parameters
----------
arr_or_dtype : array-like or dtype
Expand Down Expand Up @@ -381,6 +387,9 @@ def is_period_dtype(arr_or_dtype) -> bool:
"""
Check whether an array-like or dtype is of the Period dtype.
.. deprecated:: 2.2.0
Use isinstance(dtype, pd.Period) instead.
Parameters
----------
arr_or_dtype : array-like or dtype
Expand Down Expand Up @@ -424,6 +433,9 @@ def is_interval_dtype(arr_or_dtype) -> bool:
"""
Check whether an array-like or dtype is of the Interval dtype.
.. deprecated:: 2.2.0
Use isinstance(dtype, pd.IntervalDtype) instead.
Parameters
----------
arr_or_dtype : array-like or dtype
Expand Down Expand Up @@ -470,6 +482,9 @@ def is_categorical_dtype(arr_or_dtype) -> bool:
"""
Check whether an array-like or dtype is of the Categorical dtype.
.. deprecated:: 2.2.0
Use isinstance(dtype, pd.CategoricalDtype) instead.
Parameters
----------
arr_or_dtype : array-like or dtype
Expand Down

0 comments on commit 7390f8e

Please sign in to comment.