Skip to content

BUG: groupby.count() on different dtypes seems buggy #8169

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
jreback opened this issue Sep 3, 2014 · 0 comments · Fixed by #8171
Closed

BUG: groupby.count() on different dtypes seems buggy #8169

jreback opened this issue Sep 3, 2014 · 0 comments · Fixed by #8171
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions Groupby
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Sep 3, 2014

from SO

something odd going on here:

vals = np.hstack((np.random.randint(0,5,(100,2)), np.random.randint(0,2,(100,2))))
df = pd.DataFrame(vals, columns=['a', 'b', 'c', 'd'])
df[df==2] = np.nan
df2 = df.copy()
df2['a'] = df2['a'].astype('float32')
df2['b'] = df2['b'].astype('float32')
df.groupby(['c', 'd']).count()
df2.groupby(['c','d']).count()
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.

1 participant