diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 180083dbbb742..616054205243c 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -318,7 +318,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.api.extensions.ExtensionArray.view SA01" \ -i "pandas.api.indexers.VariableOffsetWindowIndexer PR01,SA01" \ -i "pandas.api.interchange.from_dataframe RT03,SA01" \ - -i "pandas.api.types.infer_dtype PR07,SA01" \ -i "pandas.api.types.is_any_real_numeric_dtype SA01" \ -i "pandas.api.types.is_bool PR01,SA01" \ -i "pandas.api.types.is_bool_dtype SA01" \ diff --git a/pandas/_libs/lib.pyx b/pandas/_libs/lib.pyx index 6a31ce84ed418..0b7a19d2d8ca4 100644 --- a/pandas/_libs/lib.pyx +++ b/pandas/_libs/lib.pyx @@ -1442,6 +1442,7 @@ def infer_dtype(value: object, skipna: bool = True) -> str: Parameters ---------- value : scalar, list, ndarray, or pandas type + The input data to infer the dtype. skipna : bool, default True Ignore NaN values when inferring the type. @@ -1476,6 +1477,14 @@ def infer_dtype(value: object, skipna: bool = True) -> str: TypeError If ndarray-like but cannot infer the dtype + See Also + -------- + api.types.is_scalar : Check if the input is a scalar. + api.types.is_list_like : Check if the input is list-like. + api.types.is_integer : Check if the input is an integer. + api.types.is_float : Check if the input is a float. + api.types.is_bool : Check if the input is a boolean. + Notes ----- - 'mixed' is the catchall for anything that is not otherwise