problem:import csv data
Miki Tebeka
miki.tebeka at gmail.com
Tue Sep 13 09:09:59 EDT 2011
More information about the Python-list mailing list
Tue Sep 13 09:09:59 EDT 2011
- Previous message (by thread): problem:import csv data
- Next message (by thread): send string to input of another process
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
.separator (and .import) are not SQL commands but "sqlite3" commands.
You can get the same effect with the following code:
with open('/tmp/data.csv') as fo:
reader = csv.reader(fo)
cur.executemany('INSERT INTO quote VALUES (?, ?, ?, ?, ?, ?, ?)'), reader)
HTH
--
Miki Tebeka <miki.tebeka at gmail.com>
http://pythonwise.blogspot.com
- Previous message (by thread): problem:import csv data
- Next message (by thread): send string to input of another process
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list