

def Map(self, function):
    'Applies the function to every row in the table.\n\n    Args:\n      function: A function applied to each row.\n\n    Returns:\n      A new TextTable()\n\n    Raises:\n      TableError: When transform is not invalid row entry. The transform\n                  must be compatible with Append().\n    '
    new_table = self.__class__()
    new_table._table = [self.header]
    for row in self:
        filtered_row = function(row)
        if filtered_row:
            new_table.Append(filtered_row)
    return new_table

dataset/ETHPy150Open google/textfsm/texttable.py TextTable.Map/original