pyspark.sql.Column.like

Column.like(other: Union[Column, LiteralType, DecimalLiteral, DateTimeLiteral]) → Column

SQL like expression. Returns a boolean Column based on a SQL LIKE match.

Parameters
otherstr

a SQL LIKE pattern

Examples

>>> df.filter(df.name.like('Al%')).collect()
[Row(age=2, name='Alice')]