Specify starting point of foreach enumerator in ruby -


i have rake file pulls in data external csv file , enumerates through with:

csv.foreach(file, :headers => true) |row| 

what effective way (in ruby) specify starting point within spreadsheet?

:headers => true allows me start importing second line, if want start line 20?

use .drop(#rows ignore):

csv.open(file, :headers => true).drop(20).each |row|


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -