Skip to content

Commit

Permalink
docs: Fix ES01, SA01 code check of pandas.api.types.is_bool_dtype (p…
Browse files Browse the repository at this point in the history
…andas-dev#59507)

* docs: FIx ES01, SA01 code check of `pandas.api.types.is_bool_dtype`

* chore: Remove pandas in See Also
  • Loading branch information
tan-i-ham authored Aug 14, 2024
1 parent eba59fa commit d36c589
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.api.extensions.ExtensionArray.view SA01" \
-i "pandas.api.interchange.from_dataframe RT03,SA01" \
-i "pandas.api.types.is_bool PR01,SA01" \
-i "pandas.api.types.is_bool_dtype SA01" \
-i "pandas.api.types.is_categorical_dtype SA01" \
-i "pandas.api.types.is_complex PR01,SA01" \
-i "pandas.api.types.is_complex_dtype SA01" \
Expand Down
8 changes: 8 additions & 0 deletions pandas/core/dtypes/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,10 @@ def is_bool_dtype(arr_or_dtype) -> bool:
"""
Check whether the provided array or dtype is of a boolean dtype.
This function verifies whether a given object is a boolean data type. The input
can be an array or a dtype object. Accepted array types include instances
of ``np.array``, ``pd.Series``, ``pd.Index``, and similar array-like structures.
Parameters
----------
arr_or_dtype : array-like or dtype
Expand All @@ -1284,6 +1288,10 @@ def is_bool_dtype(arr_or_dtype) -> bool:
boolean
Whether or not the array or dtype is of a boolean dtype.
See Also
--------
api.types.is_bool : Check if an object is a boolean.
Notes
-----
An ExtensionArray is considered boolean when the ``_is_boolean``
Expand Down

0 comments on commit d36c589

Please sign in to comment.