def swapLabels(cat,A,B):
    """
    Swap labels bewteen Cluster A and Cluster B.

    Parameters
    ----------
    cat : pd.DataFrame
        Must have column names: event_ID, Cluster.
    A : int, str
        Original cluster assignment.
    B : int, str
        New cluster assignment.

    Returns
    -------
    pd.DataFrame

    """



## swap label A to B
    dummy_variable = 999
    cat_swapped = cat.copy()
    cat_swapped.Cluster = cat_swapped.Cluster.replace(A,dummy_variable)
    cat_swapped.Cluster = cat_swapped.Cluster.replace(B,A)
    cat_swapped.Cluster = cat_swapped.Cluster.replace(dummy_variable,B)


    return cat_swapped