def create_groups_dict(data, keys, columns):
    """
    Function creates a dictionary containing different subsets of a dataset. Subsets are created using dummies. 

    Args:
    ------
        data(pd.DataFrame): Dataset that should be split into subsets.
        keys(list): List of keys that should be used in the dataframe.
        columns(list): List of dummy variables in dataset that are used for creating subsets.

    Returns:
    ---------
        groups_dict(dictionary)
    """
    groups_dict = {}

    for i in range(len(keys)):
        groups_dict[keys[i]] = data[data[columns[i]] == 1]

    return groups_dict