Delete sparse matrix X rows by label in obs

Hi Everyone,

I am trying to rerun my pipeline without two of the four multiplexed groups.
Is it possible to delete the raw data ‘X’ associated with the groups I want to remove?
I have tried

adata_merge.obs.drop(adata_merge.obs.loc[adata_merge.obs[‘Disease.Etiology’]== ‘Disease.State’].index, inplace=True)

but this only deletes rows from obs not from X

Thank you,

Ed

How about this?

adata_merge[adata_merge.obs['Disease.Etiology']== 'Disease.State'].copy()