@@ -957,19 +957,23 @@ def str_extractall(arr, pat, flags=0):
957
957
958
958
Parameters
959
959
----------
960
- pat : string
961
- Regular expression pattern with capturing groups
960
+ pat : str
961
+ Regular expression pattern with capturing groups.
962
962
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``.
964
967
965
968
Returns
966
969
-------
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.
973
977
974
978
See Also
975
979
--------
@@ -1015,7 +1019,6 @@ def str_extractall(arr, pat, flags=0):
1015
1019
1 a 2
1016
1020
B 0 b 1
1017
1021
C 0 NaN 1
1018
-
1019
1022
"""
1020
1023
1021
1024
regex = re .compile (pat , flags = flags )
0 commit comments