ting.assert_frame_equal.html)
    * [ polars.testing.assert_frame_not_equal ](../../api/polars.testing.assert_frame_not_equal.html)
    * [ polars.testing.assert_series_equal ](../../api/polars.testing.assert_series_equal.html)
    * [ polars.testing.assert_series_not_equal ](../../api/polars.testing.assert_series_not_equal.html)
    * [ polars.testing.parametric.dataframes ](../../api/polars.testing.parametric.dataframes.html)
    * [ polars.testing.parametric.series ](../../api/polars.testing.parametric.series.html)
    * [ polars.testing.parametric.column ](../../api/polars.testing.parametric.column.html)
    * [ polars.testing.parametric.columns ](../../api/polars.testing.parametric.columns.html)
    * [ polars.testing.parametric.create_list_strategy ](../../api/polars.testing.parametric.create_list_strategy.html)
    * [ polars.testing.parametric.load_profile ](../../api/polars.testing.parametric.load_profile.html)
    * [ polars.testing.parametric.set_profile ](../../api/polars.testing.parametric.set_profile.html)

  * [ Metadata ](../../metadata.html) __
    * [ polars.build_info ](../../api/polars.build_info.html)
    * [ polars.get_index_type ](../../api/polars.get_index_type.html)
    * [ polars.show_versions ](../../api/polars.show_versions.html)
    * [ polars.thread_pool_size ](../../api/polars.thread_pool_size.html)
    * [ polars.threadpool_size ](../../api/polars.threadpool_size.html)

  * [ __ ](../../../index.html)
  * [ Python API reference ](../../index.html)
  * __
  * [ Functions ](../functions.html)
  * polars.zeros 

#  polars.zeros  #

polars.  zeros  (

     _ n  :  [ int  ](https://docs.python.org/3/library/functions.html#int "\(in Python v3.12\)") |  Expr  _ , 
     _ dtype  :  PolarsDataType  =  Float64  _ , 
     _ *  _ , 
     _ eager  :  [ bool  ](https://docs.python.org/3/library/functions.html#bool "\(in Python v3.12\)") =  False  _ , 
)  →  Expr  |  Series  [ [source]  ](https://github.com/pola-rs/polars/blob/main/py-polars/polars/functions/repeat.py#L252-L298) # 
    

Construct a column of length ` n  ` filled with zeros.

This is syntactic sugar for the ` repeat  ` function.

Parameters  :

    

**n**

    

Length of the resulting column.

**dtype**

    

Data type of the resulting column. Defaults to Float64.

**eager**

    

Evaluate immediately and return a ` Series  ` . If set to ` False  ` , return
an expression instead.

See also

[ ` repeat  ` ](polars.repeat.html#polars.repeat "polars.repeat")

    
[ ` lit  ` ](polars.lit.html#polars.lit "polars.lit")

    

Notes

If you want to construct a column in lazy mode and do not need a pre-
determined length, use [ ` lit()  ` ](polars.lit.html#polars.lit "polars.lit")
instead.

Examples

    
    
    >>> pl.zeros(3, pl.Int8, eager=True)
    shape: (3,)
    Series: 'zeros' [i8]
    [
        0
        0
        0
    ]
    

[ __ previous  polars.when  ](polars.when.html "previous page") [ next
polars.Expr.apply  __ ](polars.Expr.apply.html "next page")

__ On this page

  * ` zeros()  `

© Copyright 2020, Ritchie Vink.  

Created using [ Sphinx ](https://www.sphinx-doc.org/) 7.2.4.  

Built with the [ PyData Sphinx Theme ](https://pydata-sphinx-
theme.readthedocs.io/en/stable/index.html) 0.14.1.