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.transform('size') fails for multicolumn frame #27469

Closed
ghost opened this issue Jul 19, 2019 · 0 comments · Fixed by #45716
Closed

BUG: Groupby.transform('size') fails for multicolumn frame #27469

ghost opened this issue Jul 19, 2019 · 0 comments · Fixed by #45716
Labels
Apply Apply, Aggregate, Transform Bug Groupby
Milestone

Comments

@ghost
Copy link

ghost commented Jul 19, 2019

Adding tests for #27467 surfaced some bugs:

from pandas import *
df = DataFrame(dict(a=[0, 0, 0, 1, 1, 1], b=range(6)))
g = df.groupby(np.repeat([0,1], 3))
# ok
print(g.size()) 
#fails
g.transform('size') 
TypeError: Transform function invalid for data types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apply Apply, Aggregate, Transform Bug Groupby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants