Expr.tanh
methodView source ↗
def tanh() -> Expr
Categories: numeric
Calculate the hyperbolic tangent of the element value.
Examples
>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf.select(td.col("val"), td.col("val").tanh().alias("tanh"))
>>>
┌─────┬──────────┐
│ val ┆ tanh │
│ --- ┆ --- │
│ f64 ┆ f64 │
╞═════╪══════════╡
│ 0.0 ┆ 0.0 │
│ 3.0 ┆ 0.995055 │
│ 6.0 ┆ 0.999988 │
│ 9.0 ┆ 1.0 │
└─────┴──────────┘