Closed TranThiHang97 closed 2 months ago
I try and fix with pandas, as if the function has been covered.
adata.obs["louvain_anno"] = adata.obs["louvain_anno"].cat.rename_categories({
'10':'10/Ery',
'16':'16/Stem',
'19':'19/Neu',
'20':'20/Mk',
'22':'22/Baso',
'24':'24/Mo',
})
print(adata.obs.louvain_anno.cat.categories)
print(adata.obs.louvain_anno.head(40))
Thanks, that’s a good fix!
Please make sure these conditions are met
What happened?
I am learning the Trajectory inference tutorial. The code 1 from instruction gave me an error, then I fixed it. However, when I continued to the subsequent codes (code 2), I encountered an error that I do not know how to fix.
Minimal code sample
Code 1:
Fix for code 1:
Code 2:
sc.tl.paga(adata, groups="louvain_anno")
Error output
Code 1
Error of code 2:
Versions