CLN/DEPR: removed deprecated as_indexer arg from str.match() by HyunTruth · Pull Request #22356 · pandas-dev/pandas (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation14 Commits9 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

HyunTruth

gfyoung

@@ -630,7 +630,7 @@ Numeric
Strings
^^^^^^^
-
- Removed as_indexer(deprecated of 0.21.0) keyword completely from str.match() (:issue:`22356`,:issue:`6581`)

Choose a reason for hiding this comment

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

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

gfyoung

with tm.assert_produces_warning(FutureWarning):
with tm.assert_raises_regex(TypeError,
"match() got an unexpected "
"keyword argument 'as_indexer'"):

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.

@gfyoung gfyoung changed the titleremoved as_indexer(deprecated of 0.21.0) arg completely from str.match() removed as_indexer(deprecated of 0.20.0) arg completely from str.match()

Aug 15, 2018

@codecov

@jreback

jreback

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

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?

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.

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.

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.

Choose a reason for hiding this comment

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

ok then

@HyunTruth

@jreback What do you suggest as the next course of action on this issue?

@jreback

@jorisvandenbossche jorisvandenbossche changed the titleremoved as_indexer(deprecated of 0.20.0) arg completely from str.match() CLN/DEPR: removed deprecated as_indexer arg from str.match()

Sep 5, 2018

jorisvandenbossche

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!

@HyunTruth