diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 3ab63b9bcb860..18f394b8e549b 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -601,12 +601,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.api.types.is_int64_dtype \ pandas.api.types.is_integer_dtype \ pandas.api.types.is_interval_dtype \ - pandas.api.types.is_named_tuple \ pandas.api.types.is_numeric_dtype \ pandas.api.types.is_object_dtype \ pandas.api.types.is_period_dtype \ - pandas.api.types.is_re \ - pandas.api.types.is_re_compilable \ pandas.api.types.is_signed_integer_dtype \ pandas.api.types.is_sparse \ pandas.api.types.is_string_dtype \ diff --git a/pandas/core/dtypes/inference.py b/pandas/core/dtypes/inference.py index 401b2c80b2c18..28e034de869f4 100644 --- a/pandas/core/dtypes/inference.py +++ b/pandas/core/dtypes/inference.py @@ -147,6 +147,8 @@ def is_re(obj) -> bool: Examples -------- + >>> from pandas.api.types import is_re + >>> import re >>> is_re(re.compile(".*")) True >>> is_re("foo") @@ -170,6 +172,7 @@ def is_re_compilable(obj) -> bool: Examples -------- + >>> from pandas.api.types import is_re_compilable >>> is_re_compilable(".*") True >>> is_re_compilable(1) @@ -310,6 +313,7 @@ def is_named_tuple(obj) -> bool: Examples -------- >>> from collections import namedtuple + >>> from pandas.api.types import is_named_tuple >>> Point = namedtuple("Point", ["x", "y"]) >>> p = Point(1, 2) >>>