tabsdata.tableframe.expr.string.ExprStringNameSpace.strip_suffix#
- ExprStringNameSpace.strip_suffix(suffix: td_expr.IntoExpr) td_expr.Expr [source]#
Trim string values removing the given suffix
- Parameters:
suffix – Suffix to remove from the string.
Example:
>>> import tabsdata as td >>> >>> tf: td.TableFrame ... >>> >>> tf.select(td.col("a"), td.col("a") .str.strip_suffix("cd").alias("strip_suffix")) >>> ┌───────────────────────────────┬─────────────────┐ │ a ┆ strip_suffix │ │ --- ┆ --- │ │ str ┆ str │ ╞═══════════════════════════════╪═════════════════╡ │ cba cd ┆ cba │ │ bx ┆ bx │ │ null ┆ null │ └───────────────────────────────┴─────────────────┘