Skip to content

Commit

Permalink
updated docs for pandas.Series.str.find
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiragSehra committed Mar 10, 2018
1 parent 7c14e4f commit 0f892e4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pandas/core/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,8 @@ def extractall(self, pat, flags=0):
return str_extractall(self._orig, pat, flags=flags)

_shared_docs['find'] = ("""
Retrieves least index of substring.
Return %(side)s indexes in each strings in the Series/Index
where the substring is fully contained between [start:end].
Return -1 on failure. Equivalent to standard :meth:`str.%(method)s`.
Expand All @@ -1788,6 +1790,19 @@ def extractall(self, pat, flags=0):
-------
found : Series/Index of integer values
Examples
--------
>>> s = Series('Finding with pandas')
>>> s.str.find('wi')
0 8
dtype: int64
Returns -1 if the substring is not found in S
>>> s.str.find('wi', start=0, end=5)
0 -1
dtype: int64
See Also
--------
%(also)s
Expand Down

0 comments on commit 0f892e4

Please sign in to comment.