Skip to content

Commit 226312f

Browse files
committed
docstr
1 parent 1e1b190 commit 226312f

File tree

1 file changed

+1
-9
lines changed
  • python/pyspark/pandas/data_type_ops

1 file changed

+1
-9
lines changed

python/pyspark/pandas/data_type_ops/base.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,7 @@ def transform_boolean_operand_to_numeric(
113113
def _should_return_all_false(left: IndexOpsLike, right: Any) -> bool:
114114
"""
115115
Determine if binary comparison should short-circuit to all False,
116-
based on incompatible dtypes.
117-
118-
This function is used to mimic pandas behavior when comparing operands
119-
with non-matching dtypes that cannot be reasonably coerced, such as
120-
comparing floats with strings.
121-
122-
It internally transforms boolean operands to numeric (long) and checks
123-
whether both operands are numeric or not. If they are not, and their
124-
dtypes differ, the comparison result is considered to be all False.
116+
based on incompatible dtypes: non-numeric vs. numeric (including bools).
125117
"""
126118
from pandas.api.types import is_numeric_dtype
127119
from pyspark.pandas.base import IndexOpsMixin

0 commit comments

Comments
 (0)