anndata.experimental.AnnCollection.lazy_attr

AnnCollection.lazy_attr(attr, key=None)

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.