-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN/DEPR: removed deprecated as_indexer arg from str.match() #22356
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
doc/source/whatsnew/v0.24.0.txt
Outdated
@@ -630,7 +630,7 @@ Numeric | |||
Strings | |||
^^^^^^^ | |||
|
|||
- | |||
- Removed as_indexer(deprecated of 0.21.0) keyword completely from str.match() (:issue:`22356`,:issue:`6581`) |
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.
- You mean
0.20.0
? You can also just remove that parenthetical comment. - This should be in the
Removal of prior version deprecations/changes
section.
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.
thanks, will fix it straight away
pandas/tests/test_strings.py
Outdated
with tm.assert_produces_warning(FutureWarning): | ||
with tm.assert_raises_regex(TypeError, | ||
"match() got an unexpected " | ||
"keyword argument 'as_indexer'"): |
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.
I like the thought. However, we generally just drop all of the relevant tests when a keyword is getting dropped after a deprecation.
Codecov Report
@@ Coverage Diff @@
## master #22356 +/- ##
==========================================
- Coverage 92.05% 92.05% -0.01%
==========================================
Files 169 169
Lines 50709 50705 -4
==========================================
- Hits 46679 46675 -4
Misses 4030 4030
Continue to review full report at Codecov.
|
see my comment: #22316 (comment) I am not sure we can remove this for 0.24.0 |
@@ -722,8 +722,6 @@ def str_match(arr, pat, case=True, flags=0, na=np.nan, as_indexer=None): | |||
flags : int, default 0 (no flags) | |||
re module flags, e.g. re.IGNORECASE | |||
na : default NaN, fill value for missing values. | |||
as_indexer | |||
.. deprecated:: 0.21.0 |
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.
so is this just wrong?
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.
@HyunTruth can you see when this was added? if it was in 0.21.0 then we can't remove this yet, if it was a mistake / typo then we could.
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.
Sure, I'll check on it.
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.
@jreback It seems to be a typo, as in whatsnew v0.20.0, it is stated that
- The default behaviour of ``Series.str.match`` has changed from extracting
groups to matching the pattern. The extracting behaviour was deprecated
since pandas version 0.13.0 and can be done with the ``Series.str.extract``
method (:issue:`5224`). As a consequence, the ``as_indexer`` keyword is
ignored (no longer needed to specify the new behaviour) and is deprecated.
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.
ok then
@jreback What do you suggest as the next course of action on this issue? |
can you rebase |
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.
Apart from fixing the conflicts (updating with latest master), looks good to me!
Pull request moved to #22626 |
git diff upstream/master -u -- "*.py" | flake8 --diff
removed as_indexer(deprecated of 0.20.0) arg completely from str.match.