I am trying to delete the row being used in my csv file but I am unsure how to approach it. I want to delete the first row that is used in the file (not including the header. I also want to use the same file, not create a new one. Here is what I have so far:
if os.path.isfile('test.csv'):
with open("test.csv", "r") as f_input:
csv_input = csv.reader(f_input)
next(f_input) #skips header
for row in csv_input:
item_c =row[0]
item_l = row[1]
item_v = row[2]
item_k = row[3]
#DELETE THE ROW AFTER I GET THE INFO FOR EACH "item"