pyspark.sql.Column.contains¶
-
Column.contains(other: Union[Column, LiteralType, DecimalLiteral, DateTimeLiteral]) → Column¶ Contains the other element. Returns a boolean
Columnbased on a string match.- Parameters
- other
string in line. A value as a literal or a
Column.
Examples
>>> df.filter(df.name.contains('o')).collect() [Row(age=5, name='Bob')]