Comments (1)
No need to have special support, you can do it something like this:
# raw data
data = scipy.sparse.csr_matrix(...)
obs = pd.DataFrame(..., index=...) # index has duplicates
# order and deduplicate
order = obs.assign(Median=data.median(axis=1)).idxmax()
adata = AnnData(data[order, :], obs.iloc[order])
from anndata.
Related Issues (20)
- `TypeError: no supported conversion for types: (dtype('float32'), dtype('<U7'))` when concatenating anndata object HOT 3
- Show a warning when updating `obsm` on a subset of rows HOT 1
- Fix missing backports HOT 5
- Support custom matrix formats for `X` HOT 6
- PR checks for dev process PRs? HOT 3
- Future changes to Awkward Array behavior class resolution HOT 14
- Read anndata from file-like objects (specifically, in "backed" mode) HOT 3
- MemoryError: Unable to allocate 9.90 GiB for an array with shape (310385, 8563) and data type float32 HOT 7
- AnnData cannot open file that was opened with JHDF5 before HOT 18
- Empty `AnnData` returned when reading Zarr from S3 HOT 2
- Stop tests from writing files everywhere HOT 4
- Set up GPU CI HOT 19
- (Semi-)automatic conversion of nullable columns to the appropriate pandas arrays HOT 3
- Contibution guide looks wonky
- Cupy support in anndata HOT 8
- add an inplace as actual function for views HOT 2
- How do I check if my anndata object has a populated raw slot? HOT 1
- Adding "_reader" and "_writer" arguments sometimes causes errors HOT 3
- Keeping original categories when subsetting an `AnnData` object HOT 9
- 'ValueError: value.index does not match parent’s axis 0 names' when making .copy() of subsetted anndata HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anndata.