Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pandas/core/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def str_count(arr, pat, flags=0):
Escape ``'$'`` to find the literal dollar sign.

>>> s = pd.Series(['$', 'B', 'Aab$', '$$ca', 'C$B$', 'cat'])
>>> s.str.count('\$')
>>> s.str.count('\\$')
0 1
1 0
2 1
Expand Down Expand Up @@ -358,7 +358,7 @@ def str_contains(arr, pat, case=True, flags=0, na=np.nan, regex=True):

Returning any digit using regular expression.

>>> s1.str.contains('\d', regex=True)
>>> s1.str.contains('\\d', regex=True)
0 False
1 False
2 False
Expand Down