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

Implemented argmin & argmax for Series #1790

Merged
merged 14 commits into from
Sep 25, 2020
Merged

Conversation

itholic
Copy link
Contributor

@itholic itholic commented Sep 23, 2020

This PR proposes Series.argmin & Series.argmax.

>>> kser = ks.Series(
...     {
...         "Corn Flakes": 100.0,
...         "Almond Delight": 110.0,
...         "Cinnamon Toast Crunch": 120.0,
...         "Cocoa Puff": 110.0,
...         "Expensive Flakes": 120.0,
...         "Cheap Flakes": 100.0,
...     }
... )
>>> kser.argmin()
0
>>> kser.argmax()
2

databricks/koalas/series.py Outdated Show resolved Hide resolved
databricks/koalas/series.py Outdated Show resolved Hide resolved
databricks/koalas/series.py Outdated Show resolved Hide resolved
databricks/koalas/series.py Outdated Show resolved Hide resolved
databricks/koalas/series.py Outdated Show resolved Hide resolved
databricks/koalas/series.py Outdated Show resolved Hide resolved
databricks/koalas/tests/test_series.py Show resolved Hide resolved
databricks/koalas/series.py Outdated Show resolved Hide resolved
databricks/koalas/series.py Outdated Show resolved Hide resolved
databricks/koalas/series.py Outdated Show resolved Hide resolved
@itholic
Copy link
Contributor Author

itholic commented Sep 25, 2020

Addressed comments.
Thanks, @ueshin !

databricks/koalas/series.py Outdated Show resolved Hide resolved
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.

LGTM.

@ueshin
Copy link
Collaborator

ueshin commented Sep 25, 2020

Thanks! merging.

@ueshin ueshin merged commit 0e30f5e into databricks:master Sep 25, 2020
@itholic itholic deleted the s_argmin_max branch October 6, 2020 00:16
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.

2 participants