Expr.log1p
methodView source ↗
def log1p() -> TdExpr
Categories: numeric
Calculate the natural logarithm plus one.
Examples
>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf = tf.select(td.col("val"), td.col("val").log1p().alias("log1p")
>>>
┌──────┬──────────┐
│ val ┆ log1p │
│ --- ┆ --- │
│ f64 ┆ f64 │
╞══════╪══════════╡
│ -1.0 ┆ -inf │
│ 0.0 ┆ 0.0 │
│ 1.1 ┆ 0.741937 │
│ 2.0 ┆ 1.098612 │
│ inf ┆ inf │
│ null ┆ null │
│ NaN ┆ NaN │
└──────┴──────────┘