Rich Shepard wrote:
  What I still need to figure out is why csv.writer() is not writing proper
delimited output. Here's an example of output lines:

JCM-20B,2008-11-13,Depth to Water,97.08
JCM-20B,2008-11-13,pH,7.40
JCM-20B,2008-11-13,Total Dissolved Solids,211
JCM-20B,2008-11-13,"Alkalinity, Bicarbonate",167

Notice that the third item is not quoted unless the text contains a comma. What I want for output is to have all text fields (that is, all but the last
one) quoted, preferably with single quotes to keep postgres happy.

Rich,

Try adding quoting=csv.QUOTE_NONNUMERIC to your writer invocation.

~Ethan~
_______________________________________________
Portland mailing list
[email protected]
http://mail.python.org/mailman/listinfo/portland

Reply via email to