I am using the package csv in python 2.7
import csv
f=open('Path\Top.csv')
csv_f = csv.reader(f)
counter = 0
for row in csv_f:
if counter ==0 :
next
# Do some more stuff
counter += 1
The first row contains headers and i don't wish to include it in the loop. I am trying the above scheme to omit the first row from analysis.
Is there an elegant way of accomplishing the same, the above scheme doesn't work.
Also, how do I iterate from some row i to row j without having to start from first row every time.The file is big and it wastes time to start from 1st row every single time.
Thanks.