pyspark.sql.Column.contains¶
-
Column.
contains
(other: Union[Column, LiteralType, DecimalLiteral, DateTimeLiteral]) → Column¶ Contains the other element. Returns a boolean
Column
based 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')]