table2 = skip(table1, 2) look(table2) # skipcomments table1 = [['##aaa', 'bbb', 'ccc'], ['##mmm',], ['#foo', 'bar'], ['##nnn', 1], ['a', 1], ['b', 2]] from petl import skipcomments, look look(table1) table2 = skipcomments(table1, '##') look(table2) # unpack table1 = [['foo', 'bar'], [1, ['a', 'b']], [2, ['c', 'd']], [3, ['e', 'f']]] from petl import unpack, look look(table1) table2 = unpack(table1, 'bar', ['baz', 'quux']) look(table2)
['q', 2]] table2 = etl.tail(table1, 4) table2 # skipcomments() ################ import petl as etl table1 = [['##aaa', 'bbb', 'ccc'], ['##mmm',], ['#foo', 'bar'], ['##nnn', 1], ['a', 1], ['b', 2]] table2 = etl.skipcomments(table1, '##') table2 # annex() ######### import petl as etl table1 = [['foo', 'bar'], ['A', 9], ['C', 2], ['F', 1]] table2 = [['foo', 'baz'], ['B', 3], ['D', 10]] table3 = etl.annex(table1, table2)