File: vis.py

package info (click to toggle)
python-petl 1.7.17-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,224 kB
  • sloc: python: 22,617; makefile: 109; xml: 9
file content (28 lines) | stat: -rw-r--r-- 562 bytes parent folder | download | duplicates (2)
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)