def generate_set(data, exclude, include, maximum, minimum):
    """Generate a data set based on criteria.

    Args:
        data : DataFrame to filter.
        exclude : Dict of columns and lists of values to exclude.
        include : Dict of columns and lists of values to include.
        maximum : Dict of columns and values that should be max limit.
        minimum : Dict of columns and values that should be min limit.

    Returns:
        Pandas DataFrame filtered on criteria.

    """
    # Exclude items.
    for col, vals in exclude.items():
        data = data[~data[col].isin(vals)]
    # Include items.
    for col, vals in include.items():
        data = data[data[col].isin(vals)]
    # Filter minimum.
    for col, val in minimum.items():
        filt = data[col].astype('float') >= val
        data = data[filt]
    # Filter maximum.
    for col, val in maximum.items():
        filt = data[col].astype('float') <= val
        data = data[filt]
    return data