diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 82a2b0a9189af..e8a9963438648 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -574,9 +574,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.api.types.is_datetime64_ns_dtype \ pandas.api.types.is_datetime64tz_dtype \ pandas.api.types.is_integer_dtype \ - pandas.api.types.is_interval_dtype \ - pandas.api.types.is_period_dtype \ - pandas.api.types.is_signed_integer_dtype \ pandas.api.types.is_sparse \ pandas.api.types.is_string_dtype \ pandas.api.types.is_unsigned_integer_dtype \ diff --git a/pandas/core/dtypes/common.py b/pandas/core/dtypes/common.py index 3be290ca2dfac..b87109473e470 100644 --- a/pandas/core/dtypes/common.py +++ b/pandas/core/dtypes/common.py @@ -398,9 +398,10 @@ def is_period_dtype(arr_or_dtype) -> bool: Examples -------- + >>> from pandas.core.dtypes.common import is_period_dtype >>> is_period_dtype(object) False - >>> is_period_dtype(PeriodDtype(freq="D")) + >>> is_period_dtype(pd.PeriodDtype(freq="D")) True >>> is_period_dtype([1, 2, 3]) False @@ -434,9 +435,10 @@ def is_interval_dtype(arr_or_dtype) -> bool: Examples -------- + >>> from pandas.core.dtypes.common import is_interval_dtype >>> is_interval_dtype(object) False - >>> is_interval_dtype(IntervalDtype()) + >>> is_interval_dtype(pd.IntervalDtype()) True >>> is_interval_dtype([1, 2, 3]) False @@ -727,6 +729,7 @@ def is_signed_integer_dtype(arr_or_dtype) -> bool: Examples -------- + >>> from pandas.core.dtypes.common import is_signed_integer_dtype >>> is_signed_integer_dtype(str) False >>> is_signed_integer_dtype(int)