Skip to content

Commit 7e3dd90

Browse files
committed
DOC: small fixes in text.rst
1 parent da92411 commit 7e3dd90

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

doc/source/text.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -372,12 +372,11 @@ You can check whether elements contain a pattern:
372372

373373
.. ipython:: python
374374
375-
pattern = r'[a-z][0-9]'
375+
pattern = r'[0-9][a-z]'
376376
pd.Series(['1', '2', '3a', '3b', '03c']).str.contains(pattern)
377377
378378
or match a pattern:
379379

380-
381380
.. ipython:: python
382381
383382
pd.Series(['1', '2', '3a', '3b', '03c']).str.match(pattern)
@@ -386,7 +385,7 @@ The distinction between ``match`` and ``contains`` is strictness: ``match``
386385
relies on strict ``re.match``, while ``contains`` relies on ``re.search``.
387386

388387
Methods like ``match``, ``contains``, ``startswith``, and ``endswith`` take
389-
an extra ``na`` argument so missing values can be considered True or False:
388+
an extra ``na`` argument so missing values can be considered True or False:
390389

391390
.. ipython:: python
392391

0 commit comments

Comments
 (0)