make_var_names_unique#

SingleCell.make_var_names_unique(*, separator='-')[source]#

Make var_names unique.

Append ‘-1’ to the second occurence of a given name, ‘-2’ to the third occurrence, and so on. ‘-’ can be switched to a different string via the separator argument.

Raises an error if any var_names already contain separator.

Parameters:

separator: str

the string connecting the original name and the integer suffix

Returns:

A new SingleCell dataset with the var_names made unique.

Return type:

SingleCell