def filter(self, filters):
subset = Costs(self._columns)<EOL>filters = [(col, re.compile(regex)) for col, regex in filters]<EOL>for lineitem in self._lineitems:<EOL><INDENT>for filter in filters:<EOL><INDENT>if filter[<NUM_LIT:1>].search(lineitem[filter[<NUM_LIT:0>]]) is None:<EOL><INDENT>continue<EOL><DEDENT>subset.add(lineitem)<EOL><DEDENT><DEDENT>return subset<EOL>
Pass in a list of tuples where each tuple represents one filter.
The first element of the tuple is the name of the column to
filter on and the second value is a regular expression which
each value in that column will be compared against.  If the
regular expression matches the value in that column, that
lineitem will be included in the new Costs object returned.

Example:

    filters=[('ProductName', '.*DynamoDB')]

This filter would find all lineitems whose ``ProductName``
column contains values that end in the string ``DynamoDB``.