How to get the row index of a csv file using ```for row in CSV.File(filename)```?

Hi, I plan to read a .csv file using for row in CSV.File(filename) like the following:

for row in CSV.File(filename) 
      # parse the information stored in this row to a vector of my defined type

Now, I need to know the row index. Is there a simple way to get the row index from this setting?
Thank you.

for (i, row) in enumerate(…)


@dpsanders, you mean

for (i,row) in enumerate(CSV.File(filename))


1 Like