def filter_rows(col, value):
    """Filter DataFrame by removing rows with unwanted values for a
    given column."""

    def filterer(data):
        return data.loc[data[col] != value]

    return filterer