def table_from_gwf(filename, name, columns=None, selection=None):
<EOL>if isinstance(filename, FILE_LIKE):<EOL><INDENT>filename = filename.name<EOL><DEDENT>stream = io_gwf.open_gwf(filename)<EOL>if selection is None:<EOL><INDENT>selection = []<EOL><DEDENT>selection = parse_column_filters(selection)<EOL>data = []<EOL>i = <NUM_LIT:0><EOL>while True:<EOL><INDENT>try:<EOL><INDENT>frevent = stream.ReadFrEvent(i, name)<EOL><DEDENT>except IndexError:<EOL><INDENT>break<EOL><DEDENT>i += <NUM_LIT:1><EOL>if columns is None:<EOL><INDENT>columns = _columns_from_frevent(frevent)<EOL><DEDENT>row = _row_from_frevent(frevent, columns, selection)<EOL>if row is not None:  <EOL><INDENT>data.append(row)<EOL><DEDENT><DEDENT>return Table(rows=data, names=columns)<EOL>
Read a Table from FrEvent structures in a GWF file (or files)

    Parameters
    ----------
    filename : `str`
        path of GWF file to read

    name : `str`
        name associated with the `FrEvent` structures

    columns : `list` of `str`
        list of column names to read

    selection : `str`, `list` of `str`
        one or more column selection strings to apply, e.g. ``'snr>6'``