nodes: 0, module; 1, function_definition; 2, function_name:index; 3, parameters; 4, block; 5, identifier:self; 6, identifier:columnnames; 7, default_parameter; 8, expression_statement; 9, import_from_statement; 10, return_statement; 11, identifier:sort; 12, True; 13, comment:"""Return a tableindex object.
  
          :class:`tableindex` lets one get the row numbers of the rows holding
          given values for the columns for which the index is created.
          It uses an in-memory index on which a binary search is done.
          By default the table is sorted on the given columns to get the correct
          index order.
  
          For example::
  
            t = table('3c343.MS')
            tinx = t.index('ANTENNA1')
            print tinx.rownumbers(0)       # print rownrs containing ANTENNA1=0
  
          """; 14, relative_import; 15, dotted_name; 16, call; 17, import_prefix; 18, dotted_name; 19, identifier:tableindex; 20, identifier:tableindex; 21, argument_list; 22, identifier:tableindex; 23, identifier:self; 24, identifier:columnnames; 25, identifier:sort
code: def index(self, columnnames, sort=True):
          """Return a tableindex object.
  
          :class:`tableindex` lets one get the row numbers of the rows holding
          given values for the columns for which the index is created.
          It uses an in-memory index on which a binary search is done.
          By default the table is sorted on the given columns to get the correct
          index order.
  
          For example::
  
            t = table('3c343.MS')
            tinx = t.index('ANTENNA1')
            print tinx.rownumbers(0)       # print rownrs containing ANTENNA1=0
  
          """
          from .tableindex import tableindex
          return tableindex(self, columnnames, sort)