Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Segfault in .groupby() with empty groups #1048
I get a segfault when running:
As an aside, in my scenario (which I don't know how general it is) the user can supply the grouping. If no grouping should take place (i.e. groupby()) I would like .groupby() to return the whole data, instead there is a:
/usr/local/lib/python2.7/dist-packages/pandas/core/groupby.pyc in _get_compressed_labels(self)
IndexError: list index out of range
I'm not sure whether it would be sensible to change the behavior so that the whole DataFrame is returned, but to me it would be more useful than raising an error.