Skip to content

REGR: groupby.count on string[pyarrow] returns column with string dtype instead of integer #54751

Closed
@phofl

Description

@phofl

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

pdf = pd.DataFrame({"a": [1, 2, 3], "b": pd.Series(["a", "b", "a"], dtype="string[pyarrow]")})
pdf.groupby("a").count().dtypes

Issue Description

b    string[pyarrow]
dtype: object

this is a regression on main

Expected Behavior

b    int64
dtype: object

Installed Versions

Replace this line with the output of pd.show_versions()

Metadata

Metadata

Assignees

No one assigned

    Labels

    BlockerBlocking issue or pull request for an upcoming releaseBugGroupbyRegressionFunctionality that used to work in a prior pandas version

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions