polars.Expr.str.lstrip#

Expr.str.lstrip(matches: None | str = None) Expr[source]#

Remove leading whitespace.

Examples

>>> df = pl.DataFrame({"foo": [" lead", "trail ", " both "]})
>>> df.select(pl.col("foo").str.lstrip())
shape: (3, 1)
┌────────┐
│ foo    │
│ ---    │
│ str    │
╞════════╡
│ lead   │
├╌╌╌╌╌╌╌╌┤
│ trail  │
├╌╌╌╌╌╌╌╌┤
│ both   │
└────────┘