tabsdata.tableframe.expr.string.ExprStringNameSpace.contains_any#
- ExprStringNameSpace.contains_any(patterns: td_expr.IntoExpr, *, ascii_case_insensitive: bool = False) td_expr.Expr [source]#
Evaluate if the string contains any of the given patterns.
- Parameters:
patterns – The patterns to search for.
ascii_case_insensitive – If true, the search is case-insensitive.
Example:
>>> import tabsdata as td >>> >>> tf: td.TableFrame ... >>> >>> tf.select(td.col("a"), td.col("a") .str.contains_any(["a", "b"]).alias("contains_any")) >>> ┌──────┬──────────────┐ │ a ┆ contains_any │ │ --- ┆ --- │ │ str ┆ bool │ ╞══════╪══════════════╡ │ abc ┆ true │ │ axy ┆ true │ │ xyb ┆ true │ │ xyz ┆ false │ │ null ┆ null │ └──────┴──────────────┘