Good morning, what do I have to change in this code to execute a loop that will execute the query as many times as number of rows in the csv file and will increase the 'i' index and with each execution?
CodePudding user response:
I assume filecontent is a list. In this case, try to replace your while
loop with that:
for i in range(len(filecontent)):
sql = ...
Please make sure to remove i=i 1
line from the end of your loop.