pandas.DataFrame.last_valid_index

DataFrame.last_valid_index()[source]

Return index for last non-NA value or None, if no NA value is found.

Returns
scalartype of index

Notes

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