The sqlite3 .import command won't work for ordinary csv data because it treats any comma as a delimiter even in a quoted string.
This includes trying to re-import a csv file that was created by the shell:
Create table T (F1 integer, F2 varchar);
Insert into T values (1, 'Hey!');
Insert into T values (2, 'Hey, You!');
.mode csv
.output test.csv
select * from T;
Contents of test.csv:
1,Hey!
2,"Hey, You!"
delete from T;
.import test.csv T
Error: test.csv line 2: expected 2 columns of data but found 3
It seems we must transform the csv into a list of Insert statements, or perhaps a different delimiter will work.
Over at SuperUser I saw a suggestion to use LogParser to deal with csv files, I'm going to look into that.