tabsdata.tableframe.expr.string.ExprStringNameSpace.ends_with#

ExprStringNameSpace.ends_with(suffix: str | Expr) Expr[source]#

Evaluate if the string ends with.

Parameters:

suffix – The suffix to search for.

Example:

>>> 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      │
└──────┴───────────┘