#NEWLINE# @ utils . allow_tableset_proxy #NEWLINE# def where( self , test ) : #NEWLINE# #INDENT# '\n    Create a new :class:`.Table` with only those rows that pass a test.\n\n    :param test:\n        A function that takes a :class:`.Row` and returns :code:`True` if\n        it should be included in the new :class:`.Table`.\n    :type test:\n        :class:`function`\n    :returns:\n        A new :class:`.Table`.\n    ' #NEWLINE# rows = [ ] #NEWLINE# if ( self . _row_names is not None ) : #NEWLINE# #INDENT# row_names = [ ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# row_names = None #NEWLINE# #UNINDENT# for ( i , row ) in enumerate ( self . _rows ) : #NEWLINE# #INDENT# if test ( row ) : #NEWLINE# #INDENT# rows . append ( row ) #NEWLINE# if ( row_names is not None ) : #NEWLINE# #INDENT# row_names . append ( self . _row_names [ rows ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return self . _fork ( rows , row_names = row_names )