daft.expressions.expressions.ExpressionStringNamespace.contains#

ExpressionStringNamespace.contains(substr: str | daft.expressions.expressions.Expression) daft.expressions.expressions.Expression[source]#

Checks whether each string contains the given pattern in a string column

Example

>>> col("x").str.contains(col("foo"))
Parameters

pattern – pattern to search for as a literal string, or as a column to pick values from

Returns

a Boolean expression indicating whether each value contains the provided pattern

Return type

Expression