diff --git a/ci/code_checks.sh b/ci/code_checks.sh index f2d9f582d8932..c8fde0c330d0a 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -123,7 +123,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.api.types.is_iterator PR07,SA01" \ -i "pandas.api.types.is_list_like SA01" \ -i "pandas.api.types.is_named_tuple PR07,SA01" \ - -i "pandas.api.types.is_object_dtype SA01" \ -i "pandas.api.types.is_re PR07,SA01" \ -i "pandas.api.types.is_re_compilable PR07,SA01" \ -i "pandas.api.types.pandas_dtype PR07,RT03,SA01" \ diff --git a/pandas/core/dtypes/common.py b/pandas/core/dtypes/common.py index ff855f97a352b..4d6ecfce48112 100644 --- a/pandas/core/dtypes/common.py +++ b/pandas/core/dtypes/common.py @@ -139,6 +139,11 @@ def is_object_dtype(arr_or_dtype) -> bool: """ Check whether an array-like or dtype is of the object dtype. + This method examines the input to determine if it is of the + object data type. Object dtype is a generic data type that can + hold any Python objects, including strings, lists, and custom + objects. + Parameters ---------- arr_or_dtype : array-like or dtype @@ -149,6 +154,15 @@ def is_object_dtype(arr_or_dtype) -> bool: boolean Whether or not the array-like or dtype is of the object dtype. + See Also + -------- + api.types.is_numeric_dtype : Check whether the provided array or dtype is of a + numeric dtype. + api.types.is_string_dtype : Check whether the provided array or dtype is of + the string dtype. + api.types.is_bool_dtype : Check whether the provided array or dtype is of a + boolean dtype. + Examples -------- >>> from pandas.api.types import is_object_dtype