NVIDIA / NVIDIA/cudf

[BUG] cudf.pandas Bitwise AND/OR with nulls doesn't match pandas

Open
#19,417 3 comments 0 reactions 0 assignees View on GitHub
bug cudf.pandas Narwhals Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Describe the bug**
Bitwise AND doesn't match pandas result

**Steps/Code to reproduce bug**
```python
In [1]: import cudf

In [2]: import pandas as pd

In [3]: cudf.Series([True, True, False]) & cudf.Series([True, None, None])
Out[3]:
0 True
1
2
dtype: bool

In [4]: pd.Series([True, True, False]) & pd.Series([True, None, None])
Out[4]:
0 True
1 False
2 False
dtype: bool

```
```python
In [1]: %load_ext cudf.pandas

In [2]: import pandas as pd

In [3]: pd.Series([True, True, False]) & pd.Series([True, None, None])
Out[3]:
0 True
1 None
2 None
dtype: object
```

**Expected behavior**
Match pandas when running with cudf.pandas OR under pandas compatibility mode

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.