def split_col_dtype()

in scripts/preprocessing.py [0:0]


def split_col_dtype(col_type: dict, target_label: str) -> Tuple[List[str], List[str]]:
    """Split columns into categorical and numerical lists

    :param col_type: dictionary of columns and data types
    :type col_type: dict
    :param target_label: name of prediction target
    :type target_label: str
    :return: Lists of categorical and numerical columns
    :rtype: List[str]
    """
    cat, num = [], []
    for k, v in col_type.items():
        if k == target_label:
            continue
        if v != "category":
            num.append(k)
        else:
            cat.append(k)
    return cat, num