Skip to content

groupby on single col df results in ValueError on Master, works on 0.18.1 #13530

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
alan-wong opened this issue Jun 29, 2016 · 5 comments · Fixed by #13561
Closed

groupby on single col df results in ValueError on Master, works on 0.18.1 #13530

alan-wong opened this issue Jun 29, 2016 · 5 comments · Fixed by #13561
Labels
Milestone

Comments

@alan-wong
Copy link

alan-wong commented Jun 29, 2016

On 0.18.1 the following works without error

df = pd.DataFrame({'a':list('abssbab')})
df.groupby('a').count()

this results in an empty df:

Out[255]:
Empty DataFrame
Columns: []
Index: [a, b, s]

On Master it results in an error see related: #13393

@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented Jun 29, 2016

Hmm, it now does work on master:

In [1]: df = pd.DataFrame({'a':list('abssbab')})

In [2]: df.groupby('a').count()
Out[2]:
Empty DataFrame
Columns: []
Index: [a, b, s]

In [3]: pd.__version__
Out[3]: '0.18.1+156.g3944a36'

I fetched an rebuilt in the meantime, so maybe my pandas master was not built correctly when I tested that. Sorry about that.

Anyway, the empty frame is the correct result I think, so we could add a test for this. Do you want to do a PR for this?

@alan-wong
Copy link
Author

Wish I could but I can't compile pandas on my dev machine due to compiler issues

@jorisvandenbossche
Copy link
Member

@alan-wong If you want tro try to solve those issues and have questions about that, just ask! (but better on https://gitter.im/pydata/pandas, that's a better medium for this instead in an issue)

@alan-wong
Copy link
Author

@jorisvandenbossche thanks for the link I was completely unaware of that channel I'll join now

@sinhrks
Copy link
Member

sinhrks commented Jul 4, 2016

Will add tests and close this.

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

Successfully merging a pull request may close this issue.

3 participants