mteb/BrightProStackoverflowRetrieval huggingface dataset:
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)
  * __
  * [ Computation ](../computation.html)
  * polars.Expr.n_unique 

#  polars.Expr.n_unique  #

Expr.  n_unique  (  )  →  Self  [ [source]  ](https://github.com/pola-
rs/polars/blob/main/py-polars/polars/expr/expr.py#L3281-L3305) #

    

Count unique values.

Notes

` null  ` is considered to be a unique value for the purposes of this
operation.

Examples

    
    
    >>> df = pl.DataFrame({"x": [1, 1, 2, 2, 3], "y": [1, 1, 1, None, None]})
    >>> df.select(
    ...     x_unique=pl.col("x").n_unique(),
    ...     y_unique=pl.col("y").n_unique(),
    ... )
    shape: (1, 2)
    ┌──────────┬──────────┐
    │ x_unique ┆ y_unique │
    │ ---      ┆ ---      │
    │ u32      ┆ u32      │
    ╞══════════╪══════════╡
    │ 3        ┆ 2        │
    └──────────┴──────────┘
    

[ __ previous  polars.Expr.mode  ](polars.Expr.mode.html "previous page") [
next  polars.Expr.null_count  __ ](polars.Expr.null_count.html "next page")

__ On this page

  * ` Expr.n_unique()  `

© 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.
ng.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)
  * __
  * [ Operators ](../operators.html)
  * polars.Expr.gt 

#  polars.Expr.gt  #

Expr.  gt  (  _ other  :  Any  _ )  →  Self  [ [source]
](https://github.com/pola-rs/polars/blob/main/py-
polars/polars/expr/expr.py#L5164-L5196) #

    

Method equivalent of “greater than” operator ` expr  > other  ` .

Parameters  :

    

**other**

    

A literal or expression value to compare with.

Examples

    
    
    >>> df = pl.DataFrame(
    ...     data={
    ...         "x": [5.0, 4.0, float("nan"), 2.0],
    ...         "y": [5.0, 3.0, float("nan"), 1.0],
    ...     }
    ... )
    >>> df.with_columns(
    ...     pl.col("x").gt(pl.col("y")).alias("x > y"),
    ... )
    shape: (4, 3)
    ┌─────┬─────┬───────┐
    │ x   ┆ y   ┆ x > y │
    │ --- ┆ --- ┆ ---   │
    │ f64 ┆ f64 ┆ bool  │
    ╞═════╪═════╪═══════╡
    │ 5.0 ┆ 5.0 ┆ false │
    │ 4.0 ┆ 3.0 ┆ true  │
    │ NaN ┆ NaN ┆ false │
    │ 2.0 ┆ 1.0 ┆ true  │
    └─────┴─────┴───────┘
    

[ __ previous  polars.Expr.ge  ](polars.Expr.ge.html "previous page") [ next
polars.Expr.le  __ ](polars.Expr.le.html "next page")

__ On this page

  * ` Expr.gt()  `

© 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.
](../../api/polars.exceptions.SchemaError.html)
    * [ polars.exceptions.SchemaFieldNotFoundError ](../../api/polars.exceptions.SchemaFieldNotFoundError.html)
    * [ polars.exceptions.ShapeError ](../../api/polars.exceptions.ShapeError.html)
    * [ polars.exceptions.StructFieldNotFoundError ](../../api/polars.exceptions.StructFieldNotFoundError.html)
    * [ polars.exceptions.TooManyRowsReturnedError ](../../api/polars.exceptions.TooManyRowsReturnedError.html)

  * [ Testing ](../../testing.html) __
    * [ polars.testing.assert_frame_equal ](../../api/polars.testing.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)
  * __
  * [ List ](../list.html)
  * polars.Serie... 

#  polars.Series.list.std  #

Series.list.  std  (  _ ddof  :  [ int
](https://docs.python.org/3/library/functions.html#int "\(in Python v3.12\)")
=  1  _ )  →  Series  [ [source]  ](https://github.com/pola-
rs/polars/blob/py-0.20.23/py-polars/polars/series/list.py#L252-L266) #

    

Compute the std value of the arrays in the list.

Examples

    
    
    >>> s = pl.Series("values", [[-1, 0, 1], [1, 10]])
    >>> s.list.std()
    shape: (2,)
    Series: 'values' [f64]
    [
            1.0
            6.363961
    ]
    

[ __ previous  polars.Series.list.sort  ](polars.Series.list.sort.html
"previous page") [ next  polars.Series.list.sum  __
](polars.Series.list.sum.html "next page")

__ On this page

  * ` Series.list.std()  `

© 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.
sert_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)
  * __
  * [ Aggregation ](../aggregation.html)
  * polars.Expr.arg_min 

#  polars.Expr.arg_min  #

Expr.  arg_min  (  )  →  Self  [ [source]  ](https://github.com/pola-
rs/polars/blob/main/py-polars/polars/expr/expr.py#L2444-L2465) #

    

Get the index of the minimal value.

Examples

    
    
    >>> df = pl.DataFrame(
    ...     {
    ...         "a": [20, 10, 30],
    ...     }
    ... )
    >>> df.select(pl.col("a").arg_min())
    shape: (1, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ u32 │
    ╞═════╡
    │ 1   │
    └─────┘
    

[ __ previous  polars.Expr.arg_max  ](polars.Expr.arg_max.html "previous
page") [ next  polars.Expr.count  __ ](polars.Expr.count.html "next page")

__ On this page

  * ` Expr.arg_min()  `

© 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.
](../../api/polars.exceptions.SchemaError.html)
    * [ polars.exceptions.SchemaFieldNotFoundError ](../../api/polars.exceptions.SchemaFieldNotFoundError.html)
    * [ polars.exceptions.ShapeError ](../../api/polars.exceptions.ShapeError.html)
    * [ polars.exceptions.StructFieldNotFoundError ](../../api/polars.exceptions.StructFieldNotFoundError.html)
    * [ polars.exceptions.TooManyRowsReturnedError ](../../api/polars.exceptions.TooManyRowsReturnedError.html)

  * [ Testing ](../../testing.html) __
    * [ polars.testing.assert_frame_equal ](../../api/polars.testing.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)
  * __
  * [ List ](../list.html)
  * polars.Serie... 

#  polars.Series.list.var  #

Series.list.  var  (  _ ddof  :  [ int
](https://docs.python.org/3/library/functions.html#int "\(in Python v3.12\)")
=  1  _ )  →  Series  [ [source]  ](https://github.com/pola-
rs/polars/blob/py-0.20.23/py-polars/polars/series/list.py#L268-L282) #

    

Compute the var value of the arrays in the list.

Examples

    
    
    >>> s = pl.Series("values", [[-1, 0, 1], [1, 10]])
    >>> s.list.var()
    shape: (2,)
    Series: 'values' [f64]
    [
            1.0
            40.5
    ]
    

[ __ previous  polars.Series.list.n_unique  ](polars.Series.list.n_unique.html
"previous page") [ next  polars.Series.list.gather_every  __
](polars.Series.list.gather_every.html "next page")

__ On this page

  * ` Series.list.var()  `

© 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.
ert_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)
  * __
  * [ Manipulation/selection ](../modify_select.html)
  * polars.Expr.fill_nan 

#  polars.Expr.fill_nan  #

Expr.  fill_nan  (  _ value  :  [ int  ](https://docs.python.org/3/library/functions.html#int "\(in Python v3.12\)") |  [ float  ](https://docs.python.org/3/library/functions.html#float "\(in Python v3.12\)") |  Expr  |  [ None  ](https://docs.python.org/3/library/constants.html#None "\(in Python v3.12\)") _ )  →  Self  [ [source]  ](https://github.com/pola-rs/polars/blob/main/py-polars/polars/expr/expr.py#L2930-L2955) # 
    

Fill floating point NaN value with a fill value.

Examples

    
    
    >>> df = pl.DataFrame(
    ...     {
    ...         "a": [1.0, None, float("nan")],
    ...         "b": [4.0, float("nan"), 6],
    ...     }
    ... )
    >>> df.with_columns(pl.col("b").fill_nan(0))
    shape: (3, 2)
    ┌──────┬─────┐
    │ a    ┆ b   │
    │ ---  ┆ --- │
    │ f64  ┆ f64 │
    ╞══════╪═════╡
    │ 1.0  ┆ 4.0 │
    │ null ┆ 0.0 │
    │ NaN  ┆ 6.0 │
    └──────┴─────┘
    

[ __ previous  polars.Expr.extend_constant  ](polars.Expr.extend_constant.html
"previous page") [ next  polars.Expr.fill_null  __
](polars.Expr.fill_null.html "next page")

__ On this page

  * ` Expr.fill_nan()  `

© 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.
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)
  * __
  * [ Manipulation/selection ](../modify_select.html)
  * polars.Expr.round 

#  polars.Expr.round  #

Expr.  round  (  _ decimals  :  [ int
](https://docs.python.org/3/library/functions.html#int "\(in Python v3.12\)")
=  0  _ )  →  Self  [ [source]  ](https://github.com/pola-
rs/polars/blob/main/py-polars/polars/expr/expr.py#L1805-L1830) #

    

Round underlying floating point data by ` decimals  ` digits.

Parameters  :

    

**decimals**

    

Number of decimals to round by.

Examples

    
    
    >>> df = pl.DataFrame({"a": [0.33, 0.52, 1.02, 1.17]})
    >>> df.select(pl.col("a").round(1))
    shape: (4, 1)
    ┌─────┐
    │ a   │
    │ --- │
    │ f64 │
    ╞═════╡
    │ 0.3 │
    │ 0.5 │
    │ 1.0 │
    │ 1.2 │
    └─────┘
    

[ __ previous  polars.Expr.rle_id  ](polars.Expr.rle_id.html "previous page")
[ next  polars.Expr.round_sig_figs  __ ](polars.Expr.round_sig_figs.html "next
page")

__ On this page

  * ` Expr.round()  `

© 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.
.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)
  * __
  * [ Manipulation/selection ](../modify_select.html)
  * polars.Expr.cast 

#  polars.Expr.cast  #

Expr.  cast  (  _ dtype  :  PolarsDataType  |  [ type  ](https://docs.python.org/3/library/functions.html#type "\(in Python v3.12\)") [  Any  ]  _ , _ *  _ , _ strict  :  [ bool  ](https://docs.python.org/3/library/functions.html#bool "\(in Python v3.12\)") =  True  _ )  →  Self  [ [source]  ](https://github.com/pola-rs/polars/blob/main/py-polars/polars/expr/expr.py#L1915-L1953) # 
    

Cast between data types.

Parameters  :

    

**dtype**

    

DataType to cast to.

**strict**

    

Throw an error if a cast could not be done (for instance, due to an overflow).

Examples

    
    
    >>> df = pl.DataFrame(
    ...     {
    ...         "a": [1, 2, 3],
    ...         "b": ["4", "5", "6"],
    ...     }
    ... )
    >>> df.with_columns(
    ...     [
    ...         pl.col("a").cast(pl.Float64),
    ...         pl.col("b").cast(pl.Int32),
    ...     ]
    ... )
    shape: (3, 2)
    ┌─────┬─────┐
    │ a   ┆ b   │
    │ --- ┆ --- │
    │ f64 ┆ i32 │
    ╞═════╪═════╡
    │ 1.0 ┆ 4   │
    │ 2.0 ┆ 5   │
    │ 3.0 ┆ 6   │
    └─────┴─────┘
    

[ __ previous  polars.Expr.bottom_k  ](polars.Expr.bottom_k.html "previous
page") [ next  polars.Expr.ceil  __ ](polars.Expr.ceil.html "next page")

__ On this page

  * ` Expr.cast()  `

© 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.