i have a csv file with data separated by " ; ". There is no problem reading the file but i want to export the data that was in the first csv no ANOTHER csv and add 1 new column to the new csv file.
import csv
with open('1.csv','r') as csvinput:
with open('agg.csv', 'w') as csvoutput:
writer = csv.writer(csvoutput)
reader = csv.reader(csvinput,lineterminator=';')
all = []
row = next(reader)
row.append('Movimiento')
all.append(row)
for row in reader:
row.append(row[0])
all.append(row)
writer.writerows(all)