Skip to content

Commit

Permalink
DOC/DEPR: clarify argmin/argmax deprecation message (#22310)
Browse files Browse the repository at this point in the history
* DOC/DEPR: clarify argmin/argmax deprecation message
  • Loading branch information
jorisvandenbossche authored and TomAugspurger committed Aug 13, 2018
1 parent eb0ac54 commit 601d71f
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1808,16 +1808,22 @@ def idxmax(self, axis=0, skipna=True, *args, **kwargs):
argmin = deprecate(
'argmin', idxmin, '0.21.0',
msg=dedent("""\
'argmin' is deprecated, use 'idxmin' instead. The behavior of 'argmin'
will be corrected to return the positional minimum in the future.
Use 'series.values.argmin' to get the position of the minimum row.""")
The current behaviour of 'Series.argmin' is deprecated, use 'idxmin'
instead.
The behavior of 'argmin' will be corrected to return the positional
minimum in the future. For now, use 'series.values.argmin' or
'np.argmin(np.array(values))' to get the position of the minimum
row.""")
)
argmax = deprecate(
'argmax', idxmax, '0.21.0',
msg=dedent("""\
'argmax' is deprecated, use 'idxmax' instead. The behavior of 'argmax'
will be corrected to return the positional maximum in the future.
Use 'series.values.argmax' to get the position of the maximum row.""")
The current behaviour of 'Series.argmax' is deprecated, use 'idxmax'
instead.
The behavior of 'argmax' will be corrected to return the positional
maximum in the future. For now, use 'series.values.argmax' or
'np.argmax(np.array(values))' to get the position of the maximum
row.""")
)

def round(self, decimals=0, *args, **kwargs):
Expand Down

0 comments on commit 601d71f

Please sign in to comment.