-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
User-facing AssertionError with groupby on list of empty list. #5289
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
Comments
What's the problem there? that seems like a reasonable assertion and a reasonable error message. |
I think it should just be a |
Oh I just closed it because I had opened it and it didn't seem particularly On Mon, Nov 17, 2014, 3:06 AM jreback [email protected] wrote:
|
this issue can be closed. original code sample raises Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\core\generic.py", line 7672, in groupby
observed=observed, **kwargs)
File "C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\core\groupby\groupby.py", line 2206, in groupby
return klass(obj, by, **kwds)
File "C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\core\groupby\groupby.py", line 363, in __init__
mutated=self.mutated)
File "C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\core\groupby\grouper.py", line 605, in _get_grouper
if not isinstance(gpr, Grouping) else gpr)
File "C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\core\groupby\grouper.py", line 242, in __init__
self.grouper = _convert_grouper(index, grouper)
File "C:\Users\simon\OneDrive\code\pandas-simonjayhawkins\pandas\core\groupby\grouper.py", line 632, in _convert_grouper
raise ValueError('Grouper and axis must be same length')
ValueError: Grouper and axis must be same length |
although there is no coverage. maybe we should add a test first. |
I hesitate to post this, but grouping on a list of empty list yields an AssertionError. It's so edge case I'm not sure it's worth bring up though:
Came from this SO issue (but it's really only related because of the error message) - http://stackoverflow.com/questions/19483991/how-to-make-grouper-and-axis-the-same-length
The text was updated successfully, but these errors were encountered: