pandas / 0.25.0 / reference / api / pandas.series.last_valid_index.html /

pandas.Series.last_valid_index

Series.last_valid_index(self) [source]

Return index for last non-NA/null value.

Returns:
scalar : type of index

Notes

If all elements are non-NA/null, returns None. Also returns None for empty Series/DataFrame.

© 2008–2012, 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/0.25.0/reference/api/pandas.Series.last_valid_index.html