conn = sqlite3.connect('path/to/file.db')
conn.text_factory = str
cur = conn.cur()
cur.execute(
    'CREATE TABLE IF NOT EXISTS mytable (field2 VARCHAR, field4 VARCHAR)')
csvData = csv.reader(open(filecsv.txt, 'rb'))
divData = chunks(csvData)
for chunk in divData:
    cur.execute('BEGIN TRANSACTION')
for field1, field2, field3, field4, field5 in chunk:
    cur.execute('INSERT OR IGNORE INTO mytable (field2, field4) VALUES (?,?)',
        (field2, field4))
cur.execute('COMMIT')
print("""
 Time Taken: %.3f sec""" % (time.time() - t))
Python CSV to SQLite