with_varm#

SingleCell.with_varm(varm=None, /, **more_varm)[source]#

Adds one or more keys to varm, overwriting existing keys with the same names if present.

Parameters:
  • varm: dict[str, ndarray | DataFrame] | None

    an optional dictionary of keys to add to (or overwrite in) varm

  • **more_varm: ndarray

    additional keys to add to (or overwrite in) varm, specified as keyword arguments

Returns:

A new SingleCell dataset with the new key(s) added to or overwritten in varm.

Return type:

SingleCell