Skip to content

Commit f52f53f

Browse files
author
Lesley
committed
DOC:GH34026
1 parent ebb727e commit f52f53f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pandas/core/strings.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -2977,8 +2977,7 @@ def encode(self, encoding, errors="strict"):
29772977
_shared_docs[
29782978
"str_strip"
29792979
] = r"""
2980-
Remove leading and trailing characters.
2981-
2980+
29822981
Strip whitespaces (including newlines) or a set of specified characters
29832982
from each string in the Series/Index from %(side)s.
29842983
Equivalent to :meth:`str.%(method)s`.
@@ -3050,12 +3049,18 @@ def strip(self, to_strip=None):
30503049
@Appender(_shared_docs["str_strip"] % dict(side="left side", method="lstrip"))
30513050
@forbid_nonstring_types(["bytes"])
30523051
def lstrip(self, to_strip=None):
3052+
"""
3053+
Remove leading characters.
3054+
"""
30533055
result = str_strip(self._parent, to_strip, side="left")
30543056
return self._wrap_result(result)
30553057

30563058
@Appender(_shared_docs["str_strip"] % dict(side="right side", method="rstrip"))
30573059
@forbid_nonstring_types(["bytes"])
30583060
def rstrip(self, to_strip=None):
3061+
"""
3062+
Remove trailing characters.
3063+
"""
30593064
result = str_strip(self._parent, to_strip, side="right")
30603065
return self._wrap_result(result)
30613066

0 commit comments

Comments
 (0)