Skip to content

Commit c69b1e3

Browse files
committed
simplify lstrip and rstrip
1 parent fd3eda2 commit c69b1e3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pandas/core/strings.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2188,23 +2188,23 @@ def encode(self, encoding, errors="strict"):
21882188
2 3. Cat?
21892189
dtype: object
21902190
2191-
>>> s.str.strip('123.!? \n\t')
2192-
0 Ant
2193-
1 Bee
2194-
2 Cat
2195-
dtype: object
2196-
2197-
>>> s.str.lstrip('123.!? \n\t')
2191+
>>> s.str.lstrip('123.')
21982192
0 Ant.
21992193
1 Bee!\n
22002194
2 Cat?\t
22012195
dtype: object
22022196
2203-
>>> s.str.rstrip('123.!? \n\t')
2197+
>>> s.str.rstrip('.!? \n\t')
22042198
0 1. Ant
22052199
1 2. Bee
22062200
2 3. Cat
22072201
dtype: object
2202+
2203+
>>> s.str.strip('123.!? \n\t')
2204+
0 Ant
2205+
1 Bee
2206+
2 Cat
2207+
dtype: object
22082208
""")
22092209

22102210
@Appender(_shared_docs['str_strip'] % dict(side='left and right sides',

0 commit comments

Comments
 (0)