Skip to content

Instantly share code, notes, and snippets.

@rhysforyou
Created March 30, 2012 08:53
Show Gist options
  • Select an option

  • Save rhysforyou/2250000 to your computer and use it in GitHub Desktop.

Select an option

Save rhysforyou/2250000 to your computer and use it in GitHub Desktop.
File.open("IDCJAC0009_068131_1800_Data.csv", 'r') do |f|
while line = f.gets
values = line.split(',')
# values[2] is the year and values[5] is the amount of rainfall
if values[2] == "2011" && values[5] != '' && values[5] != '0.0'
puts values[5]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment