append data to csv file python in loop code example
Example 1: append to csv python
with open('document.csv','a') as fd:
fd.write(myCsvRow)
Example 2: python csv add row
import csv
fields=['first','second','third']
with open(r'name', 'a') as f:
writer = csv.writer(f)
writer.writerow(fields)