df_extensions/space.py
def add_labels(self, labels: Dict[int, Union[str, Tuple[str, str]]]):
        """
        Assign labels to clusters
        Expects a dictionary of cluster number to label
        Label can be a tuple of a label and a longer description
        """
        new = copy.deepcopy(self)

        for n, label in labels.items():
            desc = ""
            if isinstance(label, tuple):
                desc = label[1]
                label = label[0]
            new.assign_name(n, label, desc)

        return new

        Assign labels to clusters
        Expects a dictionary of cluster number to label
        Label can be a tuple of a label and a longer description
        
Assign labels to clusters
Expects a dictionary of cluster number to label
Label can be a tuple of a label and a longer description
Assign labels to clusters Expects a dictionary of cluster number to label Label can be a tuple of a label and a longer description
def add_labels(self, labels: Dict[int, Union[str, Tuple[str, str]]]):
        new = copy.deepcopy(self)
        for n, label in labels.items():
            desc = ""
            if isinstance(label, tuple):
                desc = label[1]
                label = label[0]
            new.assign_name(n, label, desc)
        return new
def add_labels ( self , labels : Dict [ int , Union [ str , Tuple [ str , str ] ] ] ) : new = copy . deepcopy ( self ) for n , label in labels . items ( ) : desc = "" if isinstance ( label , tuple ) : desc = label [ 1 ] label = label [ 0 ] new . assign_name ( n , label , desc ) return new
Assign labels to clusters
Expects a dictionary of cluster number to label
Label can be a tuple of a label and a longer description
Assign labels to clusters Expects a dictionary of cluster number to label Label can be a tuple of a label and a longer description
"""
        Assign labels to clusters
        Expects a dictionary of cluster number to label
        Label can be a tuple of a label and a longer description
        """
self
labels
Dict[int, Union[str, Tuple[str, str]]]