def GetTraitDict(modalities):
    
    """
    Parameters
    ----------
    modalities: a data frame with modality options for every trait. This data frame
    has two columns, the first lists the trait name, the second lists the modality 
    names.

    Returns
    -------
    trait_dict: a python dictionary with traits as keys and modalities as values
    generated from a data frame that contains traits in the first column and possible
    modalities in the second column.
    """
    
    trait_dict = {}
    for name in modalities.index:
        trait_dict[name] = list(modalities.loc[name, modalities.columns[0]])
    return trait_dict