How to loop through a specific range of rows with Python csv reader?
The following code loops through all rows:
with open(trainFile, 'rt') as csvfile:
spamreader = csv.reader(csvfile, delimiter=' ', quotechar='|')
for row in spamreader:
print (', '.join(row))
I wish to loop only from given (i to j).