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

ENH: functions filter_columns and filter_rows created #55592

Closed
wants to merge 1 commit into from

Conversation

Cappuchinoo
Copy link

@Cappuchinoo Cappuchinoo commented Oct 19, 2023

Basically those 2 functions do the same as filter() in pandas/core/generic.py, but separated to deal with either columns or rows. Also hopefully it's easier without the need to specify the 'axis' and with the 'items' variable being replaced by 'colnames' and 'rownames'.

Is this close to what you expected @speed650? Your idea to have a list of boolean expressions (Filter_Rows( [ ('name'==bob), ( 'age' > 20) ])) be accepted by the functions sounded great, but I couldn't figure out how to do it without making them hard to use, defeating the purpose I suppose.

Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

Thx for your contribution, this needs a bit more discussion first though

@mroeschke
Copy link
Member

Thanks for the PR but as mentioned consensus is needed in the issue before proceeding with a PR so closing for now but happy to reopen if there's agreement to move forward here

@mroeschke mroeschke closed this Nov 7, 2023
@Cappuchinoo
Copy link
Author

Ok, I'll be checking from time to time to see if a consensus has been reached, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: Improve Filter function with Filter_Columns and Filter_Rows
3 participants