polars.Series.first#

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

Get the first element of the Series.

Parameters:
ignore_nulls

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

Returns `None` if the Series is empty.