def select(table, condition=[], attributes=[], newnames=None): if len(attributes): attrIdx = table.getIndex(attributes) t = table.project(attrIdx) t = table.select(condition) if not newnames is None: t.setNames(newnames) return t
def project(table, attributes): attrIdx = table.getIndex(attributes) return table.project(attrIdx)