Skip to content
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

BUG: groupby mean/median/var should always be float values #41137

Closed
rhshadrach opened this issue Apr 24, 2021 · 0 comments · Fixed by #41139
Closed

BUG: groupby mean/median/var should always be float values #41137

rhshadrach opened this issue Apr 24, 2021 · 0 comments · Fixed by #41139
Assignees
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions Groupby
Milestone

Comments

@rhshadrach
Copy link
Member

This is value-dependent behavior:

print(DataFrame({'a': [1, 3]}).groupby([1, 1]).mean())

results in the integer 2, whereas

print(DataFrame({'a': [1, 3]}).mean())

results in 2.0.

@rhshadrach rhshadrach added Bug Groupby Dtype Conversions Unexpected or buggy dtype conversions labels Apr 24, 2021
@rhshadrach rhshadrach self-assigned this Apr 24, 2021
@rhshadrach rhshadrach added API - Consistency Internal Consistency of API/Behavior and removed API - Consistency Internal Consistency of API/Behavior labels Apr 24, 2021
@jreback jreback added this to the 1.3 milestone May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions Groupby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants