anndata_rs.AnnData.subset
- AnnData.subset(obs_indices=None, var_indices=None, *, out=None, inplace=True, backend=None)
Subsetting the AnnData object.
- Parameters:
obs_indices – obs indices
var_indices – var indices
out (Path | None) – File name of the output
.h5ad
file. Wheninplace=False
, the result is written to this file. IfNone
, an in-memory AnnData is returned. This parameter is ignored wheninplace=True
.inplace (bool) – Whether to modify the AnnData object in place or return a new AnnData object.
backend (str | None) – The backend to use. “hdf5” or “zarr” are supported.
- Return type:
Optional[AnnData]