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 min/max for Index/MultiIndex #1114

Merged
merged 3 commits into from
Dec 12, 2019

Conversation

itholic
Copy link
Contributor

@itholic itholic commented Dec 10, 2019

Implement min/max for Index/MultiIndex

For Index

>>> idx = ks.Index([3, 2, 1])
>>> idx.min()
1
>>> idx.max()
3

For MultiIndex

>>> idx = ks.MultiIndex.from_tuples([('a', 'x', 1), ('b', 'y', 2)])
>>> idx.min()
('a', 'x', 1)
>>> idx.max()
('b', 'y', 2)

@codecov-io
Copy link

codecov-io commented Dec 11, 2019

Codecov Report

Merging #1114 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1114      +/-   ##
==========================================
+ Coverage   95.14%   95.14%   +<.01%     
==========================================
  Files          35       35              
  Lines        7003     7009       +6     
==========================================
+ Hits         6663     6669       +6     
  Misses        340      340
Impacted Files Coverage Δ
databricks/koalas/missing/indexes.py 100% <ø> (ø) ⬆️
databricks/koalas/indexes.py 96.49% <100%> (+0.14%) ⬆️

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 63d42c3...0aa95f8. Read the comment docs.

Copy link
Collaborator

@ueshin ueshin left a comment

Choose a reason for hiding this comment

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

Otherwise, LGTM.

databricks/koalas/indexes.py Outdated Show resolved Hide resolved
databricks/koalas/indexes.py Outdated Show resolved Hide resolved
@softagram-bot
Copy link

Softagram Impact Report for pull/1114 (head commit: 0aa95f8)

⚠️ Copy paste found

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

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

        sdf_self = self._kdf._s...(truncated 477 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]

@@ -40,6 +40,8 @@ Modifying and computations
Index.is_interval
Index.is_numeric
Index.is_object
Index.min
Index.max
Copy link
Member

Choose a reason for hiding this comment

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

@itholic can you create another PR to add all missing functions in MultiIndex below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@HyukjinKwon okay, i'll take it

@HyukjinKwon HyukjinKwon merged commit fc30159 into databricks:master Dec 12, 2019
HyukjinKwon pushed a commit that referenced this pull request Dec 12, 2019
as commented in #1114 (comment),

i filled up the missing docs for `Index` and `MultiIndex`
@itholic itholic deleted the i_min_max branch December 20, 2019 04:16
rising-star92 added a commit to rising-star92/databricks-koalas that referenced this pull request Jan 27, 2023
as commented in databricks/koalas#1114 (comment),

i filled up the missing docs for `Index` and `MultiIndex`
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