scirpy.util.DataHandler.get_obs
- DataHandler.get_obs(columns: str) pandas.core.series.Series
- DataHandler.get_obs(columns: Sequence[str]) pandas.core.frame.DataFrame
Get one or multiple obs columns from either MuData or AIRR AnnData
Checks if the column is available in
MuData.obs. If it can’t be found or DataHandler is initalized without MuData object,AnnData.obsis tried.The returned object always has the dimensions and index of MuData, even if only columns from AnnData are used. It is easy to subset to AnnData if required:
params.get_obs([col1, col2]).reindex(params.adata.obs_names)