Rich Shepard wrote:
for row in indata:
outdata.writerow([loc, row[i][j], parmlist[i], row[i][j+1]])
You're indexing into a string.
row = [
'1993-11-22', '0.008', '0.014',
'0.021', '7.560', '2.060',
'39.3', 293.0
]
row[i] = '1993-11-221' # when i == 0
row[i][j] = '1' # when i == j == 0
You should be able to do most things in Python without resorting to
manual indexing:
for row in indata:
date = row[0]
for chemical, amount in zip(parmlist, row[1:]):
outdata.writerow([date, chemical, amount])
~Ethan~
_______________________________________________
Portland mailing list
[email protected]
http://mail.python.org/mailman/listinfo/portland