Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
phofl opened this issue Aug 25, 2023 · 0 comments · Fixed by #54752
Closed
3 tasks done
Labels
Blocker Blocking issue or pull request for an upcoming release Bug Groupby Regression Functionality that used to work in a prior pandas version
Milestone

Comments

@phofl
Copy link
Member

phofl commented Aug 25, 2023

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

@phofl phofl added Bug Groupby Regression Functionality that used to work in a prior pandas version Blocker Blocking issue or pull request for an upcoming release labels Aug 25, 2023
@phofl phofl added this to the 2.1 milestone Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocker Blocking issue or pull request for an upcoming release Bug Groupby Regression Functionality that used to work in a prior pandas version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant