1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
from __future__ import division, print_function, absolute_import
# look()
########
import petl as etl
table1 = [['foo', 'bar'],
['a', 1],
['b', 2]]
etl.look(table1)
# alternative formatting styles
etl.look(table1, style='simple')
etl.look(table1, style='minimal')
# any irregularities in the length of header and/or data
# rows will appear as blank cells
table2 = [['foo', 'bar'],
['a'],
['b', 2, True]]
etl.look(table2)
# see()
#######
import petl as etl
table = [['foo', 'bar'], ['a', 1], ['b', 2]]
etl.see(table)
|