pandas.Series.str.lstrip

pandas 3.1.1 · Series and accessors · method

Remove whitespace or specified characters from the start of each string.

Call syntax

Series.str.lstrip(to_strip=None)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
to_strip Optional
Positional or keyword
Default None
str or None

Supply a set of characters to remove from the ends of each string.

Returns

Series or Index of object