anndata.acc.UnsMapAcc#

class anndata.acc.UnsMapAcc[R: AdRef](*, ref_acc_cls=<class 'anndata.acc.ItemAcc'>, scope=None, ref_class)[source]#

Bases: MapAcc[ItemAcc, MutableMapping[str, Any]]

Accessor for unstructured metadata (A.uns).

Attributes

scope: ScopeAcc | None = None#

Accessor for the element whose .AD cast the mapping is in, see anndata.acc.RefAcc.scope.

ref_class: type[R]#

Methods

__getitem__(k, /)[source]#

Get an accessor for an item, e.g. A.uns["foo"].

Parameters:
k str

The item’s key.

Return type:

ItemAcc[R]

get(adata)[source]#

Get the referenced mapping from the AnnData object, e.g. adata.obsm for A.obsm.

Return type:

MutableMapping[str, Any]