Skip to content

Commit c994e80

Browse files
lucadonini96datapythonista
authored andcommitted
DOC: Updating the docstring of Series.str.extractall (#22565)
1 parent 8ff8f90 commit c994e80

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

pandas/core/strings.py

+13-10
Original file line numberDiff line numberDiff line change
@@ -957,19 +957,23 @@ def str_extractall(arr, pat, flags=0):
957957
958958
Parameters
959959
----------
960-
pat : string
961-
Regular expression pattern with capturing groups
960+
pat : str
961+
Regular expression pattern with capturing groups.
962962
flags : int, default 0 (no flags)
963-
re module flags, e.g. re.IGNORECASE
963+
A ``re`` module flag, for example ``re.IGNORECASE``. These allow
964+
to modify regular expression matching for things like case, spaces,
965+
etc. Multiple flags can be combined with the bitwise OR operator,
966+
for example ``re.IGNORECASE | re.MULTILINE``.
964967
965968
Returns
966969
-------
967-
A DataFrame with one row for each match, and one column for each
968-
group. Its rows have a MultiIndex with first levels that come from
969-
the subject Series. The last level is named 'match' and indicates
970-
the order in the subject. Any capture group names in regular
971-
expression pat will be used for column names; otherwise capture
972-
group numbers will be used.
970+
DataFrame
971+
A ``DataFrame`` with one row for each match, and one column for each
972+
group. Its rows have a ``MultiIndex`` with first levels that come from
973+
the subject ``Series``. The last level is named 'match' and indexes the
974+
matches in each item of the ``Series``. Any capture group names in
975+
regular expression pat will be used for column names; otherwise capture
976+
group numbers will be used.
973977
974978
See Also
975979
--------
@@ -1015,7 +1019,6 @@ def str_extractall(arr, pat, flags=0):
10151019
1 a 2
10161020
B 0 b 1
10171021
C 0 NaN 1
1018-
10191022
"""
10201023

10211024
regex = re.compile(pat, flags=flags)

0 commit comments

Comments
 (0)