Can someone give me the best way to skip the first 2 lines in the CSV file. I am trying to find and replace values inside the CSV file using the code, but I'd like it to ignore the first two rows and start from the 3rd one.
Thank you!
import csv
reps = {
'+' : 'Positive',
'++' : 'Strong Positive',
'-' : 'Negative',
'+/-' : 'Resonable'}
def replace_all(text, dic):
for i, j in reps.items():
text = text.replace(i, j)
return text
with open('apitest.csv','r') as f:
text=f.read()
text=replace_all(text,reps)
with open('apitest.csv','w') as w:
w.write(text)