-
Notifications
You must be signed in to change notification settings - Fork 358
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
Implement Index.nunique #1132
Implement Index.nunique #1132
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1132 +/- ##
==========================================
- Coverage 95.18% 95.18% -0.01%
==========================================
Files 35 35
Lines 7060 7055 -5
==========================================
- Hits 6720 6715 -5
Misses 340 340
Continue to review full report at Codecov.
|
Softagram Impact Report for pull/1132 (head commit: f515dd9)
|
databricks/koalas/indexes.py
Outdated
@@ -588,6 +588,48 @@ def dropna(self): | |||
kdf = DataFrame(internal) | |||
return Index(kdf) if type(self) == Index else MultiIndex(kdf) | |||
|
|||
def nunique(self, dropna=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RainFung sorry for my late response. There's Series.nunique
implementation. Can we move that implementation to IndexOpsMixin
to support this in Index?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, i will implement it based on IndexOpsMixin
@RainFung can you resolve conflicts? Looks good. |
Implement Index.nunique by F.countDistinct