Expr.str.ends_with
methodView source ↗
def ends_with(suffix: str | Expr) -> Expr
Categories: string
Evaluate if the string ends with.
Parameters
parameter
suffixThe suffix to search for.
Examples
>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf.select(td.col("a"), td.col("a").str.ends_with("b").alias("ends_with"))
>>>
┌──────┬───────────┐
│ a ┆ ends_with │
│ --- ┆ --- │
│ str ┆ bool │
╞══════╪═══════════╡
│ a ┆ false │
│ ab ┆ true │
│ b ┆ true │
│ xaby ┆ false │
│ null ┆ null │
└──────┴───────────┘