Q:

CSV formatted data off website not being properly parsed

My Python script opens a file through urllib2; the data looks like this:
"Charitable Donation: Contribution","012","","","","","","","","","","","","","","","","","","","",""

The Python script:
reader = csv.reader(data, delimiter=',', quotechar='"', quoting=csv.QUOTE_ALL)
for row in reader:
    print row

The output is this:
['Charitable Donation: Contribution']
['', '']
['012']
['', '']
['']
['', '']
['']
['', '']
['']
['', '']
['']
['', '']
['']
['', '']
['']
['', '']
['']
['', '']
['']
['', '']
['']

What am I doing wrong?

A:

You're using double-quote (") as the delimiter instead of comma (,) ...why? How about
reader = csv.reader(data, delimiter=',', quoting=csv.QUOTE_ALL)
for row in reader:
    print row

# you can omit the delimiter argument as well, since comma is the default:
reader = csv.reader(data, quoting=csv.QUOTE_ALL)
# etc.

