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