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

Dataframe/Field array syntax for filtering and indexing #227

Open
atbenmurray opened this issue Nov 16, 2021 · 2 comments · May be fixed by #302
Open

Dataframe/Field array syntax for filtering and indexing #227

atbenmurray opened this issue Nov 16, 2021 · 2 comments · May be fixed by #302
Assignees

Comments

@atbenmurray
Copy link
Member

At the moment, dataframes have apply_filter and apply_index. In pandas , this is done through array dereference syntax. There isn't any particular reason why we can't also have the same array dereference syntax, and this would help people who are otherwise struggling to get their head around pandas style array dereference dataframe manipulations

@ericspod
Copy link
Member

ericspod commented Jun 13, 2022

This means being able to use [] brackets with indices and slices and arrays of bools for selecting, eg. foo[[0,2,12]] or foo[1:30:4].

@ericspod ericspod changed the title dataframe array syntax for filtering and indexing Dataframe/Field array syntax for filtering and indexing Jun 13, 2022
@Liyuan-Chen-1024
Copy link
Contributor

Liyuan-Chen-1024 commented Jun 21, 2022

To use [] brackets, means we need to rewrite __getitem__ function.
In fields.py, we already rewrited __getitem__ for different types of arrays.

So what this issue asked for, is to rewrite __getitem__ for fields.

@Liyuan-Chen-1024 Liyuan-Chen-1024 linked a pull request Jul 4, 2022 that will close this issue
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 a pull request may close this issue.

3 participants