def keep_only_values(data, col, value):
    """drop any rows for which the column does not have a value in a list
    data: a pandas DataFrame
    col: a column to check
    value: a list of values to keep; delete the rest
    """
   
    total = list(data[col].unique())
    invalid = set(total) - set(value)
    for val in invalid:
        data = data[data[col] != val]

    return data