I am currently trying to copy an entire column from a single .csv file to another new .csv file. That sounds rather simple but I keep getting a problem.
import csv
import glob
with open(r"C:\Users\n47-jones\Dropbox\Nevil Programming\test1.csv", "wb") as outfile:
writer = csv.writer(outfile, delimiter=",")
for csvfilename in glob.glob(r"C:\Users\n47-jones\Dropbox\Nevil Programming\testdir\*.csv"):
with open(csvfilename, "rb") as infile:
reader = csv.reader(infile)
for row in reader:
writer.writerow(row[1])
when this is output in the new test1.csv the contents of row[1] is split down into each individual letter.
e.g.
it goes from:
DATE |
to
D | A | T | E
I hope this makes some sense. Thanks for any help.
Nick