הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
Returns true if str matches pattern with escape case-insensitively, null if any arguments are null, false otherwise. The default escape character is the ''.
For the corresponding Databricks SQL function, see ilike operator.
Syntax
from pyspark.sql import functions as dbf
dbf.ilike(str=<str>, pattern=<pattern>, escapeChar=<escapeChar>)
Parameters
| Parameter | Type | Description |
|---|---|---|
str |
pyspark.sql.Column or str |
A string. |
pattern |
pyspark.sql.Column or str |
A string pattern where _ matches any one character and % matches zero or more characters. |
escapeChar |
pyspark.sql.Column (optional) |
An escape character. The default escape character is the ''. |
Examples
from pyspark.sql import functions as dbf
df = spark.createDataFrame([("Spark", "_park")], ['a', 'b'])
df.select(dbf.ilike(df.a, df.b).alias('r')).collect()
[Row(r=True)]