Skip to content

BUG: Groupby.transform('ngroup') fails #27468

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
ghost opened this issue Jul 19, 2019 · 1 comment
Closed

BUG: Groupby.transform('ngroup') fails #27468

ghost opened this issue Jul 19, 2019 · 1 comment

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.ngroup()) 
#fails
g.transform('ngroup') 
AttributeError: ("'Series' object has no attribute 'ngroup'", 'occurred at index a')
@mroeschke
Copy link
Member

This looks to work on main and looks like we have tests for this so closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants