anndata.AnnData.rename_categories#
- AnnData.rename_categories(key, categories)[source]#
Rename categories of annotation
key
inobs
,var
, anduns
.Only supports passing a list/array-like
categories
argument.Besides calling
self.obs[key].cat.categories = categories
– similar forvar
- this also renames categories in unstructured annotation that uses the categorical annotationkey
.