pyspark.sql.Column.startswith¶
-
Column.startswith(other)¶ String starts with. Returns a boolean
Columnbased on a string match.- Parameters
- other
Columnor str string at start of line (do not use a regex ^)
- other
Examples
>>> df.filter(df.name.startswith('Al')).collect() [Row(age=2, name='Alice')] >>> df.filter(df.name.startswith('^Al')).collect() []