pyspark.sql.Column.endswith#
- Column.endswith(other)[source]#
- String ends with. Returns a boolean - Columnbased on a string match.- Changed in version 3.4.0: Supports Spark Connect. - Parameters
- otherColumnor str
- string at end of line (do not use a regex $) 
 
- other
 - 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() []