look(foo['c']) # selectre table1 = (('foo', 'bar', 'baz'), ('aa', 4, 9.3), ('aaa', 2, 88.2), ('b', 1, 23.3), ('ccc', 8, 42.0), ('bb', 7, 100.9), ('c', 2)) from petl import selectre, look look(table1) table2 = selectre(table1, 'foo', '[ab]{2}') look(table2) # rowreduce table1 = [['foo', 'bar'], ['a', 3], ['a', 7], ['b', 2], ['b', 1], ['b', 9], ['c', 4]] from petl import rowreduce, look look(table1)