Skip to content

[BUG] Less/greater than binops with NA should return False in pandas.compatible mode #18257

Open
@mroeschke

Description

@mroeschke

Steps/Code to reproduce bug

In [21]: import pandas as pd

In [22]: import cudf

In [23]: pd_ser = pd.Series([np.nan, np.inf, 2.0])

In [24]: pd_ser < 2
Out[24]: 
0    False
1    False
2    False
dtype: bool

In [25]: cudf.Series.from_pandas(pd_ser, nan_as_null=True) < 2
Out[25]: 
0     <NA>
1    False
2    False
dtype: bool

For cudf.pandas we should be returning False instead of propagating NA

Addressing this will allow us to unskip tests/expr_and_series/is_finite_test.py::test_is_finite_expr[pandas] and tests/expr_and_series/is_finite_test.py::test_is_finite_series[pandas] in #18248

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcudf.pandasIssues specific to cudf.pandas

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions