I'm looking the way how to save big files. Saving the file line by line takes too long time. How I can build it in memory then save it at once?
import csv
file1 = open(r"C:\1.csv")
data1 = csv.reader(file1, delimiter=';')
csvfile = open(r"C:\output.csv", 'w', newline='')
spamwriter = csv.writer(csvfile, delimiter=';', quoting=csv.QUOTE_MINIMAL)
for row in data1:
spamwriter.writerow([row[0], row[1], row[3]])