Skip to content

Commit 0f892e4

Browse files
committed
updated docs for pandas.Series.str.find
1 parent 7c14e4f commit 0f892e4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pandas/core/strings.py

+15
Original file line numberDiff line numberDiff line change
@@ -1771,6 +1771,8 @@ def extractall(self, pat, flags=0):
17711771
return str_extractall(self._orig, pat, flags=flags)
17721772

17731773
_shared_docs['find'] = ("""
1774+
Retrieves least index of substring.
1775+
17741776
Return %(side)s indexes in each strings in the Series/Index
17751777
where the substring is fully contained between [start:end].
17761778
Return -1 on failure. Equivalent to standard :meth:`str.%(method)s`.
@@ -1788,6 +1790,19 @@ def extractall(self, pat, flags=0):
17881790
-------
17891791
found : Series/Index of integer values
17901792
1793+
Examples
1794+
--------
1795+
>>> s = Series('Finding with pandas')
1796+
>>> s.str.find('wi')
1797+
0 8
1798+
dtype: int64
1799+
1800+
Returns -1 if the substring is not found in S
1801+
1802+
>>> s.str.find('wi', start=0, end=5)
1803+
0 -1
1804+
dtype: int64
1805+
17911806
See Also
17921807
--------
17931808
%(also)s

0 commit comments

Comments
 (0)