daft.Expression.str.lstrip

daft.Expression.str.lstrip#

Expression.str.lstrip() Expression[source]#

Strip whitespace from the left side of a UTF-8 string

Example

>>> import daft
>>> df = daft.from_pydict({"x": ["foo", "bar", "  baz"]})
>>> df = df.select(df["x"].str.lstrip())
>>> df.show()
╭──────╮
│ x    │
│ ---  │
│ Utf8 │
╞══════╡
│ foo  │
├╌╌╌╌╌╌┤
│ bar  │
├╌╌╌╌╌╌┤
│ baz  │
╰──────╯

(Showing first 3 of 3 rows)
Returns:

a String expression which is self with leading whitespace stripped

Return type:

Expression