I have a csv file, from which I will read row by row and for certain field the data need to be processed and insert the results into another field in the same row before moving on to the next field.
I tried various methods like:
w = open('test.csv', 'w+')
csv_r = csv_reader(w)
csv_w = csv.writer(w)
for row in csv_r:
row[10] = results
csv_w.writerows(row)
But I am getting blank. Is there any other way doing this?
Basically i need to read a specific element in a row and then process the data and the result will be appended into another element in the same row.
csv_rhave initially? Also, how can you be sure that results in not empty(or null) ?csv_ris not emptywsupposed to be incsv_r = csv_reader(w)?