anndata.experimental.write_elem(store, k, elem, *, dataset_kwargs=mappingproxy({}))[source]#

Write an element to a storage group using anndata encoding.

store Group | GroupUnion[Group, Group]

The group to write to.

k str

The key to write to in the group. Note that absolute paths will be written from the root.

elem Any

The element to write. Typically an in-memory object, e.g. an AnnData, pandas dataframe, scipy sparse matrix, etc.

dataset_kwargs Mapping (default: mappingproxy({}))

Keyword arguments to pass to the stores dataset creation function. E.g. for zarr this would be chunks, compressor.

Return type: