ilike (Column)
Case-insensitive SQL LIKE pattern matching.
Syntax
Python
ilike(other)
Parameters
Parameter | Type | Description |
|---|---|---|
| str | SQL LIKE pattern string |
Returns
Column (boolean)
Examples
Python
df = spark.createDataFrame(
[(2, "Alice"), (5, "Bob")], ["age", "name"])
df.filter(df.name.ilike('%Ice')).collect()
Output
# [Row(age=2, name='Alice')]