polars.Series.last#

Series.last(*, ignore_nulls: bool = False) PythonLiteral | None[source]#

Get the last element of the Series.

Parameters:
ignore_nulls

Ignore null values (default False). If set to True, the last non-null value is returned, otherwise None is returned if no non-null value exists.

Returns `None` if the Series is empty.