-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
BUG: ser.str.match with mismatched case/pat/flags #63108
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
base: main
Are you sure you want to change the base?
Conversation
rhshadrach
left a comment
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.
+1 on this approach, it seems superior to me than having case or flags take precedence over the other. Docstring could use updated.
pandas/core/strings/accessor.py
Outdated
| if case is lib.no_default: | ||
| if is_re(pat): | ||
| implicit_case = not bool(pat.flags & re.IGNORECASE) | ||
| case = True |
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.
Should this be:
| if case is lib.no_default: | |
| if is_re(pat): | |
| implicit_case = not bool(pat.flags & re.IGNORECASE) | |
| case = True | |
| if case is lib.no_default: | |
| if is_re(pat): | |
| case = not bool(pat.flags & re.IGNORECASE) |
rhshadrach
left a comment
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.
Can you add a line in the whatsnew
rhshadrach
left a comment
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.
lgtm
doc/source/whatsnew/vX.X.X.rstfile if fixing a bug or adding a new feature.