Skip to content

Commit 8b36512

Browse files
committed
typo fixing and improve Index example
1 parent fee3c61 commit 8b36512

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pandas/core/strings.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,7 +2174,7 @@ def encode(self, encoding, errors="strict"):
21742174
21752175
Examples
21762176
--------
2177-
Striping whitespaces for Series
2177+
Stripping whitespaces for Series
21782178
21792179
>>> s = pd.Series([' ant', 'bee ', ' cat '])
21802180
@@ -2190,14 +2190,14 @@ def encode(self, encoding, errors="strict"):
21902190
2 cat
21912191
dtype: object
21922192
2193-
Striping a set of characters for Index
2193+
Stripping a set of characters for Index
21942194
2195-
>>> df = pd.DataFrame(index=['1.ant ','2._bee__','3. cat_'])
2195+
>>> idx = pd.Index(['1.ant ','2._bee__','3. cat_'])
21962196
2197-
>>> df.index
2197+
>>> idx
21982198
Index(['1.ant ', '2._bee__', '3. cat_'], dtype='object')
21992199
2200-
>>> df.index.str.strip('123._ ')
2200+
>>> idx.str.strip('123._ ')
22012201
Index(['ant', 'bee', 'cat'], dtype='object')
22022202
""")
22032203

0 commit comments

Comments
 (0)