Skip to content

DOC: clarify idxmax behaviour issue #18206 #18209

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

Merged
merged 4 commits into from
Nov 14, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -5812,7 +5812,7 @@ def idxmax(self, axis=0, skipna=True):
0 or 'index' for row-wise, 1 or 'columns' for column-wise
skipna : boolean, default True
Exclude NA/null values. If an entire row/column is NA, the result
will be first index.
will be NA.

Returns
-------
Expand Down
4 changes: 3 additions & 1 deletion pandas/core/indexes/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,9 @@ def duplicated(self, keep='first'):

@Appender(ibase._index_shared_docs['fillna'])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should this line be removed?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think so. That appends additional documentation.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, but I see #18018. In that case, leave this alone for this PR. Make the change in a subsequent PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved fillna changes to PR #18269 .

def fillna(self, value=None, downcast=None):
# isna is not implemented for MultiIndex
"""
isna is not implemented for MultiIndex
Copy link
Member

Choose a reason for hiding this comment

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

isna -> fillna

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jorisvandenbossche please see PR #18269 for changes related to fillna.

"""
raise NotImplementedError('isna is not defined for MultiIndex')

@Appender(_index_shared_docs['dropna'])
Expand Down
3 changes: 2 additions & 1 deletion pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,8 @@ def idxmax(self, axis=None, skipna=True, *args, **kwargs):
Parameters
----------
skipna : boolean, default True
Exclude NA/null values
Exclude NA/null values. If an entire row/column is NA, the result
Copy link
Member

Choose a reason for hiding this comment

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

"an entire row/column" -> "the entire Series"

will be NA.

Returns
-------
Expand Down