with_uns#

SingleCell.with_uns(uns=None, /, **more_uns)[source]#

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

Parameters:
  • uns: dict[str, UnsDict] | None

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

  • **more_uns: UnsItem | UnsDict

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

Returns:

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

Return type:

SingleCell