-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: Fix for .extractall (single group with quantifier) #13382 #13397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -708,6 +708,8 @@ def str_extractall(arr, pat, flags=0): | |||
subject_key = (subject_key, ) | |||
|
|||
for match_i, match_tuple in enumerate(regex.findall(subject)): | |||
if isinstance(match_tuple, basestring): | |||
match_tuple = (match_tuple,) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use compat.string_types
@@ -335,6 +335,7 @@ Bug Fixes | |||
- Bug in ``SeriesGroupBy.transform`` with datetime values and missing groups (:issue:`13191`) | |||
|
|||
- Bug in ``Series.str.extractall()`` with ``str`` index raises ``ValueError`` (:issue:`13156`) | |||
- Bug in ``.extractall()`` with single group and quantifier (:issue:`13382`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Series.str.extractall()
minor changes, looks good. ping when green. |
4c5e5d9
to
2afae62
Compare
Current coverage is 84.23%@@ master #13397 diff @@
==========================================
Files 138 138
Lines 50803 50805 +2
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 42793 42795 +2
Misses 8010 8010
Partials 0 0
|
@jreback Done. |
thanks! |
git diff upstream/master | flake8 --diff
Note that I had to fix it based on this thread, rather than directly with
[x for x in ['ab']]
as this broke previous tests.