Skip to content
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

Merged
merged 9 commits into from
Dec 18, 2019
Merged

Implement Index.nunique #1132

merged 9 commits into from
Dec 18, 2019

Conversation

RainFung
Copy link
Contributor

Implement Index.nunique by F.countDistinct

@codecov-io
Copy link

codecov-io commented Dec 16, 2019

Codecov Report

Merging #1132 into master will decrease coverage by <.01%.
The diff coverage is 91.66%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
databricks/koalas/series.py 96.46% <ø> (-0.05%) ⬇️
databricks/koalas/missing/indexes.py 100% <ø> (ø) ⬆️
databricks/koalas/base.py 96.33% <100%> (+0.15%) ⬆️
databricks/koalas/indexes.py 96.29% <50%> (-0.35%) ⬇️
databricks/koalas/frame.py 96.86% <0%> (+0.05%) ⬆️
databricks/koalas/indexing.py 94.57% <0%> (+0.21%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dff7fdd...d36dfa1. Read the comment docs.

@softagram-bot
Copy link

Softagram Impact Report for pull/1132 (head commit: f515dd9)

⚠️ Copy paste found

ℹ️ indexes.py: Copy paste fragment inside the same file on lines 762, 1136:

            raise NotImplementedError(
                \"Doesn't support symmetric_difference between Index & MultiIndex for now\")

        sdf_self = self._kdf._s...(truncated 477 chars)

ℹ️ test_indexes.py: Copy paste fragment on line 30 shared with ../test_dataframe.py, ../test_numpy_compat.py:


    @property
    def pdf(self):
        return pd.DataFrame({
            'a': [1, 2, 3, 4, 5, 6, 7, 8, 9],
            'b': [4, 5, 6, 3, 2, 1, ...(truncated 160 chars)

Now that you are on the file, it would be easier to pay back some tech. debt.

⭐ Change Overview

Showing the changed files, dependency changes and the impact - click for full size
(Open in Softagram Desktop for full details)

📄 Full report

Impact Report explained. Give feedback on this report to [email protected]

@@ -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):
Copy link
Member

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?

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 will implement it based on IndexOpsMixin

@HyukjinKwon
Copy link
Member

@RainFung can you resolve conflicts? Looks good.

@HyukjinKwon HyukjinKwon merged commit 063cec5 into databricks:master Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants