import sys sys.version_info import petl as etl etl.__version__ tbl = etl.dummytable(10, seed=42) tbl tbl.display(2) tbl.displayall() tbl.display() tbl.display(index_header=True) tbl.display(caption='example data') tbl.display(truncate=4) tbl.display(tr_style=lambda row: 'background-color: %s' % ('#faa' if row.foo > 50 else 'white')) tbl.display(tr_style='font-size: .8em', td_styles={'bar': 'background-color: yellow', 'baz': lambda v: 'background-color: %s' % ('#faa' if v > .5 else '#aaf')}) t = ((u'name', u'id'), (u'Արամ Խաչատրյան', 1), (u'Johann Strauß', 2), (u'Вагиф Сәмәдоғлу', 3), (u'章子怡', 4), (u'Արամ Խաչատրյան', 1), (u'Johann Strauß', 2), (u'Вагиф Сәмәдоғлу', 3), (u'章子怡', 4)) t tbl2 = etl.wrap(t) tbl2 tbl2.display(caption='unicode example')