I was trying to subset my dataset based on multiple louvain cluster IDs but it seems to only be possible with one cluster ID at a time. At least I'm getting the following error.
NotImplementedError: Slicing with two indices at the same time is not yet implemented. As a workaround, do row and column slicing succesively.
I'm still new to python and scanpy but would there be a workaround or fix to this? To ease the process I'v inserted what I want to do.
adata_subset = adata[adata.obs['louvain'] == '2', '3']
Do
adata_subset = adata[adata.obs['louvain'].isin(['2', '3'])]
Great, thanks!
Most helpful comment
Do