Skip to content

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

Merged
merged 1 commit into from
Jun 8, 2016

Conversation

GeraintDuck
Copy link
Contributor

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.

@GeraintDuck GeraintDuck changed the title BUG: Fix for .extractall (single group with quantifier; GH13382) BUG: Fix for .extractall (single group with quantifier) #13382 Jun 8, 2016
@@ -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,)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use compat.string_types

@jreback jreback added Bug Strings String extension data type and string data labels Jun 8, 2016
@jreback jreback added this to the 0.18.2 milestone Jun 8, 2016
@@ -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`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Series.str.extractall()

@jreback
Copy link
Contributor

jreback commented Jun 8, 2016

minor changes, looks good. ping when green.

@codecov-io
Copy link

Current coverage is 84.23%

Merging #13397 into master will increase coverage by <.01%

@@             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          

Powered by Codecov. Last updated by d5bea25...2afae62

@GeraintDuck
Copy link
Contributor Author

@jreback Done.

@jreback jreback merged commit d405bf2 into pandas-dev:master Jun 8, 2016
@jreback
Copy link
Contributor

jreback commented Jun 8, 2016

thanks!

@GeraintDuck GeraintDuck deleted the extractall-bug branch June 8, 2016 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: .extractall() throws AssertionError if capture group length > 1
3 participants