Skip to content

Commit bf11778

Browse files
jorisvandenbosschevictor
authored and
victor
committed
DOC/DEPR: clarify argmin/argmax deprecation message (pandas-dev#22310)
* DOC/DEPR: clarify argmin/argmax deprecation message
1 parent 6a46d08 commit bf11778

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

pandas/core/series.py

+12-6
Original file line numberDiff line numberDiff line change
@@ -1808,16 +1808,22 @@ def idxmax(self, axis=0, skipna=True, *args, **kwargs):
18081808
argmin = deprecate(
18091809
'argmin', idxmin, '0.21.0',
18101810
msg=dedent("""\
1811-
'argmin' is deprecated, use 'idxmin' instead. The behavior of 'argmin'
1812-
will be corrected to return the positional minimum in the future.
1813-
Use 'series.values.argmin' to get the position of the minimum row.""")
1811+
The current behaviour of 'Series.argmin' is deprecated, use 'idxmin'
1812+
instead.
1813+
The behavior of 'argmin' will be corrected to return the positional
1814+
minimum in the future. For now, use 'series.values.argmin' or
1815+
'np.argmin(np.array(values))' to get the position of the minimum
1816+
row.""")
18141817
)
18151818
argmax = deprecate(
18161819
'argmax', idxmax, '0.21.0',
18171820
msg=dedent("""\
1818-
'argmax' is deprecated, use 'idxmax' instead. The behavior of 'argmax'
1819-
will be corrected to return the positional maximum in the future.
1820-
Use 'series.values.argmax' to get the position of the maximum row.""")
1821+
The current behaviour of 'Series.argmax' is deprecated, use 'idxmax'
1822+
instead.
1823+
The behavior of 'argmax' will be corrected to return the positional
1824+
maximum in the future. For now, use 'series.values.argmax' or
1825+
'np.argmax(np.array(values))' to get the position of the maximum
1826+
row.""")
18211827
)
18221828

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

0 commit comments

Comments
 (0)