NVIDIA / NVIDIA/cudf

[BUG] cudf.pandas groupby-agg does not match pandas when column names are boolean literals

Open
#19,421 1 comment 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**
See reproducer

**Steps/Code to reproduce bug**
```python
In [1]: import pandas as pd

In [2]: pd.DataFrame({True: [1, 2], False: [3, 4]}).groupby(True, sort=False)[False].max()
Out[2]:
True
1 3
2 4
Name: False, dtype: int64
```
```python
In [1]: %load_ext cudf.pandas

In [2]: import pandas as pd

In [3]: pd.DataFrame({True: [1, 2], False: [3, 4]}).groupby(True, sort=False)[False].max()
Out[3]:
Empty DataFrame
Columns: []
Index: [1, 2]
```

**Expected behavior**
match pandas

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.