anndata.experimental.AnnCollection.lazy_attr

anndata.experimental.AnnCollection.lazy_attr#

AnnCollection.lazy_attr(attr, key=None)[source]#

Get a subsettable key from an attribute (array-like) or an attribute.

Returns a LazyAttrData object which provides subsetting over the specified attribute (.obs or .obsm) or over a key from this attribute. In the latter case, it acts as a lazy array.