| [ Web Proxy ] |
| Viewing: https://dataframes.bigquery.dev/reference/api/bigframes.pandas.Index.argmax.html | [Back] [Original] |
Section Navigation
Return int position of the largest value in the Series.
If the maximum is achieved in multiple locations, the first row position is returned.
Examples:
Consider dataset containing cereal calories
>>> s = bpd.Series({'Corn Flakes': 100.0, 'Almond Delight': 110.0,
... 'Cinnamon Toast Crunch': 120.0, 'Cocoa Puff': 110.0})
>>> s
Corn Flakes 100.0
Almond Delight 110.0
Cinnamon Toast Crunch 120.0
Cocoa Puff 110.0
dtype: Float64
>>> int(s.argmax())
2
>>> int(s.argmin())
0
The maximum cereal calories is the third element and the minimum cereal calories is the first element, since series is zero-indexed.
Row position of the maximum value.
Copyright 2019, Google.
Created using Sphinx 8.1.3.
Built with the PyData Sphinx Theme 0.19.0.
| Web Proxy Viewer | New URL | Original Page |