Expr.str.strip_chars_end
methodView source ↗
def strip_chars_end(characters: td_IntoExpr = None) -> Expr
Categories: string
Trim string values from the end of the string.
Parameters
parameter
charactersCharacters to trim from start of the string. All ending characteres in the given string are removed, regardless the order. Default is whitespace.
Examples
>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf.select(td.col("a"), td.col("a")
.str.strip_chars_end("dc ").alias("strip_chars_end"))
>>>
┌───────────────────────────────┬─────────────────┐
│ a ┆ strip_chars_end │
│ --- ┆ --- │
│ str ┆ str │
╞═══════════════════════════════╪═════════════════╡
│ cba cd ┆ cba │
│ xy z ┆ xy z │
│ null ┆ null │
└───────────────────────────────┴─────────────────┘