On this page
pandas.Index.item
- Index.item()[source]
-
Return the first element of the underlying data as a Python scalar.
- Returns
-
- scalar
-
The first element of %(klass)s.
- Raises
-
- ValueError
-
If the data is not length-1.
© 2008–2022, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/1.5.0/reference/api/pandas.Index.item.html