nunique Error when called by groupby from an empty dataframe #13239
Labels
Bug
Duplicate Report
Duplicate issue or pull request
Groupby
Indexing
Related to indexing on series/frames, not to indexes themselves
Initialize a dataframe: (I am using pandas version 0.17.1)
First if I call nunique from an empty dataframe, I get what I expect:
But If I call nunique from groupby, I get an error:
On the other hand, the 'unique' function doesn't have this issue:
I would like the 'nunique' function to behave like 'unique' when handling an empty dataframe + groupby. (Or please let me know if this issue is already fixed in later versions.) Thanks!
The text was updated successfully, but these errors were encountered: