Skip to content

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

Closed
wants to merge 9 commits into from
Closed

CLN/DEPR: removed deprecated as_indexer arg from str.match() #22356

wants to merge 9 commits into from

Conversation

HyunTruth
Copy link
Contributor

@HyunTruth HyunTruth commented Aug 15, 2018

removed as_indexer(deprecated of 0.20.0) arg completely from str.match.

@@ -630,7 +630,7 @@ Numeric
Strings
^^^^^^^

-
- Removed as_indexer(deprecated of 0.21.0) keyword completely from str.match() (:issue:`22356`,:issue:`6581`)
Copy link
Member

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.

Copy link
Contributor Author

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

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

@gfyoung gfyoung Aug 15, 2018

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 title removed 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
@gfyoung gfyoung added Deprecate Functionality to remove in pandas Clean labels Aug 15, 2018
@codecov
Copy link

codecov bot commented Aug 15, 2018

Codecov Report

Merging #22356 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Flag Coverage Δ
#multiple 90.46% <100%> (-0.01%) ⬇️
#single 42.26% <66.66%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/strings.py 98.62% <100%> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf70d11...b109d19. Read the comment docs.

@jreback
Copy link
Contributor

jreback commented Aug 16, 2018

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
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok then

@HyunTruth
Copy link
Contributor Author

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

@jreback
Copy link
Contributor

jreback commented Sep 4, 2018

can you rebase

@jorisvandenbossche jorisvandenbossche changed the title removed 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
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a 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!

@HyunTruth
Copy link
Contributor Author

HyunTruth commented Sep 7, 2018

Pull request moved to #22626

@HyunTruth HyunTruth closed this Sep 7, 2018
@jorisvandenbossche jorisvandenbossche added this to the No action milestone Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Match can return non-boolean results yet warning suggests results are boolean
4 participants