Expr.cos
methodView source ↗
def cos() -> Expr
Categories: numeric
Calculate the cosine of the element value.
Examples
>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf = tf.select(td.col("val"), td.col("val").cos().alias("cos"))
>>>
┌──────┬───────────┐
│ val ┆ cos │
│ --- ┆ --- │
│ f64 ┆ f64 │
╞══════╪═══════════╡
│ 0.1 ┆ 0.995004 │
│ 1.5 ┆ 0.070737 │
│ 1.8 ┆ -0.227202 │
│ 6.0 ┆ 0.96017 │
│ 6.0 ┆ 0.96017 │
│ 7.5 ┆ 0.346635 │
│ null ┆ null │
└──────┴───────────┘