def filter_data(col, min_value, max_value):
    """Filter DataFrame by min and max value for a specific column."""

    def filter(data):
        data = data.loc[(data[col] > min_value) & (data[col] < max_value)]
        return data

    return filter