This method will return the index of a field with the provided header. The
offset can be used to locate duplicate header names, as described
in CSV::Row.field().
# File lib/csv.rb, line 435
def index(header, minimum_index = 0)
# find the pair
index = headers[minimum_index..-1].index(header)
# return the index at the right offset, if we found one
index.nil? ? nil : index + minimum_index
end