def get_cat_code_dict(df, col):
    """Returns a dict to pase a categorical column to another categorical but using integer codes in order to use it with shap functions.

    Parameters
    ----------
    df : pd.DataFrame
    col : str
        Column to transform

    Returns
    -------
    dict
        Original names as key and codes as values.
    """
    d = dict(
        zip(
            df[col],
            df[col].cat.codes.astype("category")
        )
    )
    return d