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

segmentation fault on groupby #3011

Closed
debrouwere opened this issue Mar 11, 2013 · 3 comments · Fixed by #3017
Closed

segmentation fault on groupby #3011

debrouwere opened this issue Mar 11, 2013 · 3 comments · Fixed by #3017
Milestone

Comments

@debrouwere
Copy link

import numpy as np
import pandas as pd
series = pd.Series([np.nan, np.nan, 1, 1, 2, 2, 3, 3, 4, 4])
bins = pd.cut(series.dropna(), 4)
# this works
series.dropna().groupby(bins).mean()
# but this results in: 
# [1]    42448 segmentation fault  python
series.groupby(bins).mean()

So, I can see why trying to group a series with bins based on a different (trimmed) series can't really work and don't consider that to be a bug, but it might be nice if pandas threw a proper error message instead of segfaulting.

@ghost
Copy link

ghost commented Mar 12, 2013

Thou shalt not segfaulteth.

@debrouwere
Copy link
Author

I'm not sure what I like more, the same-day pull request or the way you were able to summarize the issue in ten words while I was grasping to find the right way to explain things. Anyway, \o/

@ghost
Copy link

ghost commented Mar 16, 2013

fixed in master.

@ghost ghost closed this as completed Mar 16, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant