コード例 #1
0
ファイル: examples.py プロジェクト: datamade/petl
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
コード例 #2
0
ファイル: examples.py プロジェクト: aklimchak/petl
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