Skip to content

User facing AssertionError in empty groupby GH5289 #8987

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
wants to merge 2 commits into from
Closed

User facing AssertionError in empty groupby GH5289 #8987

wants to merge 2 commits into from

Conversation

springcoil
Copy link
Contributor

closes #5289
Is this all we need to do?
Or am I missing something?

@jreback
Copy link
Contributor

jreback commented Dec 3, 2014

would be nice to have a test that hits this

also need to remove the .deb file that seemed to be added to the repo

@springcoil
Copy link
Contributor Author

Ok doing that - might need abit of help with the tests - since I'm not an expert on these yet.

def test_convert_grouper(axis, grouper):
def f():
len(grouper) != len(axis)
self.assertRaisesRegexp(ValueError, 'Grouper and axis must be same length', f)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to create a frame and a grouper that actually hits this test. Put a debug statement where the AssertionError is now and run the test suite and see what conditions you need to have it hit their (and if not, then maybe the code is not doing anything)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I'll get around to this soon. Create frame and grouper and then the test - what sort of debug statement did you have in mind?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just put in a import pdb; pdb.set_trace() right where I want to stop then run the test_groupby.py and see what happens. (this is just to figure things out of course)

@jreback jreback changed the title Updating for PR5289 User facing AssertionError in empty groupby GH5289 Dec 3, 2014
@jreback jreback added Frequency DateOffsets Error Reporting Incorrect or improved errors from pandas Groupby and removed Frequency DateOffsets labels Dec 3, 2014
@jreback
Copy link
Contributor

jreback commented Jan 18, 2015

@springcoil can you revisit

@springcoil
Copy link
Contributor Author

Ok I'll have a look and see what is going wrong.

@jreback
Copy link
Contributor

jreback commented May 9, 2015

closing pls reopen if/when updated

@jreback jreback closed this May 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas Groupby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User-facing AssertionError with groupby on list of empty list.
2 participants