import sqlite3 connection = sqlite3.connect('test.db') data = [['a', 1], ['b', 2], ['c', 2.0]] c = connection.cursor() c.execute('drop table if exists foobar') c.execute('create table foobar (foo text, bar float)') for row in data: c.execute('insert into foobar values (?, ?)', row) connection.commit() c.close() import pandas df = pandas.io.sql.read_frame('select * from foobar', connection) df.head() import petl.interactive as etl tbl = etl.fromdb(connection, 'select * from foobar') tbl.head() import petlx.ipython tbl.display(caption='example') tbl.display(caption='example (str)') tbl.display(caption='example (repr)', representation=repr) import petlx.dataframe tbl2 = etl.fromdataframe(df) tbl2 df2 = tbl.todataframe() df2