Esempio n. 1
0
from petl import setheader, look
look(table1)
table2 = setheader(table1, ['foofoo', 'barbar'])
look(table2)


# extendheader

table1 = [['foo'],
          ['a', 1, True],
          ['b', 2, False]]

from petl import extendheader, look
look(table1)
table2 = extendheader(table1, ['bar', 'baz'])
look(table2)


# pushheader

table1 = [['a', 1],
          ['b', 2]]

from petl import pushheader, look    
look(table1)
table2 = pushheader(table1, ['foo', 'bar'])
look(table2)


# skip
Esempio n. 2
0
from petl import setheader, look
look(table1)
table2 = setheader(table1, ['foofoo', 'barbar'])
look(table2)


# extendheader

table1 = [['foo'],
          ['a', 1, True],
          ['b', 2, False]]

from petl import extendheader, look
look(table1)
table2 = extendheader(table1, ['bar', 'baz'])
look(table2)


# pushheader

table1 = [['a', 1],
          ['b', 2]]

from petl import pushheader, look    
look(table1)
table2 = pushheader(table1, ['foo', 'bar'])
look(table2)


# skip