Skip to main content
Version: 0.9.6

Expr.str.starts_with

def starts_with(prefix: str | Expr) -> Expr

Categories: string

Evaluate if the string start with.

Parameters

parameter
prefix

The suffix to search for.

Examples

>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf.select(td.col("a"), td.col("a")
.str.starts_with("a").alias("starts_with"))
>>>
┌──────┬────────────┐
│ a ┆ start_with │
------
strbool
╞══════╪════════════╡
│ a ┆ true │
│ ab ┆ true │
│ b ┆ false │
│ xaby ┆ false │
│ null ┆ null │
└──────┴────────────┘