def SelectColumn(lig_dict, colname):
    """
    Prune the dictionary, only attribute in colname will be left.

    :param lig_dict: a tree like dictionary
    :param colname: what attribute you want to keep.
    :return: a new dictionary
    """
    lig_new = dict()
    for k in lig_dict:
        lig_new[k] = {sk:v for sk, v in lig_dict[k].items() if sk in colname}
    return lig_new