pandas / 1.4.0 / reference / api / pandas.series.item.html /

pandas.Series.item

Series. 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.4.0/reference/api/pandas.Series.item.html