def split_df(df, split_col, split_vals):
    """
    takes a data frame and splits is according to the values in the specified column, the number of returned data frames
    will be equal to the number of passed split values
    :param df: the data frame that shall be splitted
    :param split_col: defines the column by which the dataframe should be splitted
    :param split_vals: defines the values that will go in each df. needs to be categorical.
    :return: a list of the generated datasets
    """

    return [df[df[split_col] == n] for n in split_vals]