Skip to content

Conversation

thanasis2028
Copy link

closes #12553

@jreback
Copy link
Contributor

jreback commented Mar 7, 2016

thanks. See the contributing guide here

Like to have tests!

ids, _, _ = self.grouper.group_info

if len(ids) == 0: # bufix for 12553
return Series([])
Copy link
Contributor

Choose a reason for hiding this comment

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

This should just be self._constructor, so objects that inherit can keep their type

Copy link
Author

Choose a reason for hiding this comment

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

Using self._constructor causes an error for me. And the already existing return returns a Series() anyway. I don't understand the reason to change this.

@jreback
Copy link
Contributor

jreback commented Mar 8, 2016

in the future, no need to open a NEW pull-request, just force push to the old one.

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

Successfully merging this pull request may close these issues.

SeriesGroupby.nunique raises an IndexError on empty Series
3 participants