-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Series.idxmax actually returns a label, not an index #16829
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
Comments
Agreed that changing to label would be clearer. For the |
Let's leave this issue for the documentation, and I'll open a new one for the argmax. edit: #16830 |
Thanks, Tom. Please let me know if there's anything I can do to help.
…On Wed, Jul 5, 2017 at 10:22 AM, Tom Augspurger ***@***.***> wrote:
Let's leave this issue for the documentation, and I'll open a new one for
the argmax.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#16829 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABy37fO8EHOFEnYcCGnnBqgMcxUi63jLks5sK5wJgaJpZM4OOYys>
.
|
Hi! I will correct |
@iuliakhomenko : Go for it! Thanks for volunteering! |
Hi @iuliakhomenko. I think the ongoing work in #16955 will make the changes here unnecessary, so this may not be a good issue to work on. We have plenty of other issues to take on if you're interested in contributing though :) Let us know if you need help finding one. |
@TomAugspurger ok, I will look into other issues. Thanks :) |
@TomAugspurger : Except that the work isn't going ATM ;) I don't see why we shouldn't address this issue unless we definitely plan on pushing #16955 through, which judging from the lack of tagging, isn't going to happen for now. |
@gfyoung I think that PR should certainly go in, and is in fact almost ready. In the submitter doesn't respond the coming week(s), we can easily fix up and merge. |
@jorisvandenbossche : Sounds good. I didn't know where that PR stood currently in the pipeline. Thanks for clarifying! |
Just my personal opinion :-) But I have tagged it now as such to make it clear |
This is fixed in the meantime by #16955 |
In https://github.com/pandas-dev/pandas/blob/master/pandas/core/series.py, the DocStrings for
idxmax
andidxmin
are misleading (in my opinion). They say they return the index of the max/min, but they actually return the label (if I've got my Pandas lingo right).Same with
DataFrame.idxmax
andDataFrame.idxmin
.Also, is there a reason
Series
providesargmax
as a synonym foridxmax
, andDataFrame
does not?One more thought: I find it surprising that
idxmax
andargmax
do the same thing. I expectedidxmax
to return an index andargmax
to return a label. I suppose it's too late to make that change.The text was updated successfully, but these errors were encountered: