नोट
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप साइन इन करने या निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
Check if a string column ends with a substring.
Syntax
endswith(other)
Parameters
| Parameter | Type | Description |
|---|---|---|
other |
str or Column | String or Column containing the suffix to check |
Returns
Column (boolean)
Examples
df = spark.createDataFrame(
[(2, "Alice"), (5, "Bob")], ["age", "name"])
df.filter(df.name.endswith('ice')).collect()
# [Row(age=2, name='Alice')]
df.filter(df.name.endswith('ice$')).collect()
# []