-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
SeriesGroupby.nunique raises an IndexError on empty Series #12553
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
ok, pull-requests are welcome to fix |
Is this supposed to return 0 or an empty Series? I am fixing it right now but it seems awkward returning 0, while other calls of the nunique() return Series objects. |
equiv to this, an empty Series should be returned. You should only do that null checking (the line where it errors), if the series has len
|
Thanks, made a pull request:
|
This was referenced Mar 7, 2016
mroeschke
added a commit
to mroeschke/pandas
that referenced
this issue
Nov 17, 2016
mroeschke
added a commit
to mroeschke/pandas
that referenced
this issue
Nov 27, 2016
mroeschke
added a commit
to mroeschke/pandas
that referenced
this issue
Nov 30, 2016
…12553) Modified tests simplify tests
mroeschke
added a commit
to mroeschke/pandas
that referenced
this issue
Nov 30, 2016
…12553) Modified tests simplify tests Add whatsnew
4 tasks
mroeschke
added a commit
to mroeschke/pandas
that referenced
this issue
Dec 1, 2016
…12553) Modified tests simplify tests Add whatsnew Moved len check
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code Sample, a copy-pastable example if possible
Expected Output
0
output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: