polars math cos for dataframe
Compute the element-wise cosine of a column expression.
Signature
> polars math cos {flags}
Input/output types:
| input | output |
|---|---|
| polars_expression | polars_expression |
| polars_selector | polars_expression |
Examples
Compute the element-wise cosine of a float column
> [[a]; [0.0] [3.141592653589793]] |
polars into-df |
polars select (polars col a | polars math cos) |
polars collect
╭───┬───────╮
│ # │ a │
├───┼───────┤
│ 0 │ 1.00 │
│ 1 │ -1.00 │
╰───┴───────╯