I want to clean-up 12,000 wiki pages from this wiki category. For that, i am having all the 12,000 wikipages in a csv file. When my code runs, it modifies the page, one by one. How can i delete a previous row while reading a (next) row of a CSV file by python3 ? If it is possible, it will be easy to share the remaining rows of the csv file to another wiki contributor. Otherwise, i should manually open the csv file to delete 'the completed rows'.
My code as simplified;-
import csv
import pywikibot
with open('0.csv', 'r') as csvfile:
    reader = csv.reader(csvfile,delimiter="~")
    for row in reader:
    #if len(row) == 8:
        wikiPage1 = row[0]
        indexPages = row[5]
        print (wikiPage1)
        site = pywikibot.Site('ta', 'wiktionary')
        page1 = pywikibot.Page(site, wikiPage1)
        page1.text = page1.text.replace('Number','எண்')
        page1.save(summary=''Number --> எண்') 
