polars.zeros#

polars.zeros(n: int, dtype: Optional[Union[Type[DataType], DataType]] = None) Series[source]#

Return a new Series of given length and type, filled with zeros.

Parameters:
n

Number of elements in the Series

dtype

DataType of the elements, defaults to polars.Float64

Notes

In the lazy API you should probably not use this, but use lit(0) instead.