Skip to content
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

DEPR: Deprecate NDFrame.filter #27617

Closed

Conversation

topper-123
Copy link
Contributor

I propose to deprecate (DataFrame|Series).filter. The method's functionality is already in the .locmethod, except the regex functionality, for which I've made a proposal adding regex functionality to .loc in #27363.

@topper-123 topper-123 added Deprecate Functionality to remove in pandas Indexing Related to indexing on series/frames, not to indexes themselves labels Jul 26, 2019
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

ok, we need to decide on #27363 first

@jbrockmendel
Copy link
Member

@topper-123 can you rebase

@topper-123 topper-123 force-pushed the deprecate_NDFrame.filter branch 2 times, most recently from 55acd2c to 36cbcf0 Compare August 30, 2019 16:16
@jreback
Copy link
Contributor

jreback commented Oct 6, 2019

can you rebase again.

@topper-123 topper-123 force-pushed the deprecate_NDFrame.filter branch from 36cbcf0 to da9b64e Compare October 7, 2019 11:44
@topper-123
Copy link
Contributor Author

I've rebased. As you noted, this depends on #27363.

@jbrockmendel
Copy link
Member

@topper-123 im trying to clear the PR backlog; can this be closed pending #27363?

@WillAyd
Copy link
Member

WillAyd commented Dec 16, 2019

Knowing the outstanding issue is around regex capability, maybe we should just deprecate all keywords from filter for now that aren't regex?

@topper-123
Copy link
Contributor Author

That sounds like a stepping stone to deprecating. Wouldn't it make more sense then to just deprecate this method before 1.0 is released?

@WillAyd
Copy link
Member

WillAyd commented Dec 16, 2019

I don't think we'd want to outright deprecate without a replacement for the regex unless we instruct users to do df[(re.search(x) for x in df.columns)]

@topper-123
Copy link
Contributor Author

Oh yes, I meant choose another way to select by regex at the same time, sorry.

@jreback
Copy link
Contributor

jreback commented Dec 27, 2019

can you merge master and will look again

@topper-123 topper-123 force-pushed the deprecate_NDFrame.filter branch from da9b64e to 617e231 Compare December 31, 2019 01:18
@topper-123
Copy link
Contributor Author

I've rebased.

I do think an alternative should be settled on for the regex use case and I've had two proposals that were not accepted. So I'm not sure where this is floating currently?

@WillAyd
Copy link
Member

WillAyd commented Feb 2, 2020

Thanks for the PR! But I think agreement on approach here is still outstanding. If something you want to drive forward can revisit discussion in issue first

@WillAyd WillAyd closed this Feb 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants