Skip to content

Need syntax sugar for dataframe row selection #2035

Closed
@halleygithub

Description

@halleygithub

Current dataframe row selection by columns is wordy , 'rowsl()' method is need to make it looks simple.

def _rowsl(df, selection_str):
#syntax sugar to simplify column selection:

df.rowsl('col_1>0.5 & col_2<40') act as

df[(df['col_1']>0.5) & (df['col_2']<40)]

#not_implement_yet
#rst = parsing_and_ filtering
return rst

DataFrame.rowsl = _rowsl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions