Dataframe/Field array syntax for filtering and indexing
atbenmurray opened this issue · 2 comments
atbenmurray commented
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 commented
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]
.
Liyuan-Chen-1024 commented
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.