From 1a7b53d51dc9e9ae7eb75ea01309a777acb4b63b Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Sun, 6 Oct 2024 11:25:51 +0530 Subject: [PATCH] DOC: fix PR01,SA01,ES01 for pandas.api.types.is_float --- ci/code_checks.sh | 1 - pandas/_libs/lib.pyx | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 16a3a22bc4876..7de65fbfdfc48 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -106,7 +106,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Timestamp.resolution PR02" \ -i "pandas.Timestamp.tzinfo GL08" \ -i "pandas.Timestamp.year GL08" \ - -i "pandas.api.types.is_float PR01,SA01" \ -i "pandas.api.types.is_integer PR01,SA01" \ -i "pandas.api.types.is_iterator PR07,SA01" \ -i "pandas.api.types.is_re_compilable PR07,SA01" \ diff --git a/pandas/_libs/lib.pyx b/pandas/_libs/lib.pyx index de7d9af731010..23e0f387466aa 100644 --- a/pandas/_libs/lib.pyx +++ b/pandas/_libs/lib.pyx @@ -1089,9 +1089,23 @@ def is_float(obj: object) -> bool: """ Return True if given object is float. + This method checks whether the passed object is a float type. It + returns `True` if the object is a float, and `False` otherwise. + + Parameters + ---------- + obj : object + The object to check for float type. + Returns ------- bool + `True` if the object is of float type, otherwise `False`. + + See Also + -------- + api.types.is_integer : Check if an object is of integer type. + api.types.is_numeric_dtype : Check if an object is of numeric type. Examples --------