Skip to content

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

@Matt711

Description

@Matt711

Describe the bug
See reproducer

Steps/Code to reproduce bug

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
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    NarwhalsIssue discovered by Narwhals integration testsPythonAffects Python cuDF API.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