<s> from __future__ import division , print_function , absolute_import <EOL> import os <EOL> os . remove ( '<STR_LIT>' ) <EOL> import petl as etl <EOL> import sqlite3 <EOL> data = [ [ '<STR_LIT:a>' , <NUM_LIT:1> ] , <EOL> [ '<STR_LIT:b>' , <NUM_LIT:2> ] , <EOL> [ '<STR_LIT:c>' , <NUM_LIT> ] ] <EOL> connection = sqlite3 . connect ( '<STR_LIT>' ) <EOL> c = connection . cursor ( ) <EOL> _ = c . execute ( '<STR_LIT>' ) <EOL> _ = c . execute ( '<STR_LIT>' ) <EOL> for row in data : <EOL> _ = c . execute ( '<STR_LIT>' , row ) <EOL> connection . commit ( ) <EOL> c . close ( ) <EOL> table = etl . fromsqlite3 ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> table <EOL> os . remove ( '<STR_LIT>' ) <EOL> import petl as etl <EOL> table1 = [ [ '<STR_LIT:foo>' , '<STR_LIT:bar>' ] , <EOL> [ '<STR_LIT:a>' , <NUM_LIT:1> ] , <EOL> [ '<STR_LIT:b>' , <NUM_LIT:2> ] , <EOL> [ '<STR_LIT:c>' , <NUM_LIT:2> ] ] <EOL> _ = etl . tosqlite3 ( table1 , '<STR_LIT>' , '<STR_LIT>' , create = True ) <EOL> table2 = etl . fromsqlite3 ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> table2 </s>
