Description
Feature Type
-
Adding new functionality to pandas
-
Changing existing functionality in pandas
-
Removing existing functionality in pandas
Problem Description
Using the [ ] syntax can get messy/complicated for applying filters to a dataframe. The current Filter() function is also confusing to use. I Propose adding dedicated functions to quickly filter out columns and rows to make Pandas easier to use.
Feature Description
Propose adding 2 new functions
Filter_Columns(), Filter_Rows()
def Filter_Columns( columns: List, inverse:Bool, inplace:Bool )
def Filter_Rows( Rows: List, inverse:Bool, inplace:Bool )
Usage:
Filter_Columns( ['Names', 'Ages' ], inverse=False, inplace=True)
Shows columns for name and age.. Inverse is used to hide show other columns that are not name and age.
def Filter_Rows( [ ('name'==bob), ( 'age' > 20) ] , inverse:Bool, inplace:Bool )
Shows dataframe where the value in names column =bob, and age column >20
Chained
Filter_Columns( ['Names', 'Ages' ], inverse=False, inplace=True).Filter_Rows( [ ('name'==bob), ( 'age' > 20) ] , inverse:Bool, inplace:Bool )
Alternative Solutions
Use [ ] syntex... More confusing
Additional Context
No response