polars.Series.view#

Series.view(*, ignore_nulls: bool = False) SeriesView[source]#

Get a view into this Series data with a numpy array.

This operation doesn’t clone data, but does not include missing values. Don’t use this unless you know what you are doing.

Parameters:
ignore_nulls

If True then nulls are converted to 0. If False then an Exception is raised if nulls are present.

Examples

>>> s = pl.Series("a", [1, None])
>>> s.view(ignore_nulls=True)
SeriesView([1, 0])