Skip to content

SeriesGroupBy.count() failing with TypeError #11101

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
xflr6 opened this issue Sep 15, 2015 · 1 comment
Closed

SeriesGroupBy.count() failing with TypeError #11101

xflr6 opened this issue Sep 15, 2015 · 1 comment

Comments

@xflr6
Copy link
Contributor

xflr6 commented Sep 15, 2015

>>> import pandas as pd
>>> pd.__version__
u'0.17.0rc1'

>>> df = pd.DataFrame({'A': [0, 0, 1, 1], 'B': range(4)})
>>> df.groupby('A').count()['B']
A
0    2
1    2
Name: B, dtype: int64

>>> df.groupby('A')['B'].count()
Traceback (most recent call last):
...
TypeError: Cannot cast array data from dtype('int64') to dtype('int32') according to the rule 'safe'
@jreback
Copy link
Contributor

jreback commented Sep 15, 2015

dupe of #11077

fixed in master and will be in 0.17.0

thanks

@jreback jreback closed this as completed Sep 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants