-
Notifications
You must be signed in to change notification settings - Fork 30
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
Feature idea: select_index – select that only returns indices #128
Comments
Perhaps something like Theres the additional issue of whether to return DataFrame indexes (for |
My preference is generally to use different functions for returning different types (so `iselect), but API consistency is also good. I do always find the
Currently, the indexing statement used in select returns a boolean mask. I think this could be fine. I would also lean for array indices over labels, since labels can be non-unique. In theory, this could be a |
index selection function discussion 11/28/2022 namespacing: implementation: naming: 1st order 2nd order: |
I would like at least some of these to be public for use with
Also nice that we can invert it. A little unfortunate that it will always be large, even if the result is very sparse. Not sure there's a great solution there other than two implementations (one mask, one indices). Could be a problem for out-of-core . |
Would love to see a release with |
Just released in v0.4.0! We've included not only |
select
returns a subset of the passed dataframe.For use with
anndata
andsgkit
, we'd probably want to use select to get the indices of the regions of index, then subset the entireAnnData
object orxarray.Dataset
. Alternatively we may want to subset a selection of the aligned arrays.If we could get a method in
bioframe
that only returned the indices of the selected regions, we could reduce the overhead of allocating all the other columns of the passed dataframe. This would make it easier to rely on bioframe in other libraries.Demo implementation
The text was updated successfully, but these errors were encountered: