Skip to content

Instantly share code, notes, and snippets.

@taylorbrooks
Created September 12, 2012 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taylorbrooks/3710800 to your computer and use it in GitHub Desktop.
Save taylorbrooks/3710800 to your computer and use it in GitHub Desktop.
Parsing CSVs
# Finds CSV file
csv = File.open('lib/contacts.csv')
# Opens CSV to read rows
CSV.read(csv, headers: true).each do |row|
# Finds the churches that haven't been contacted
if row[4] != 'x'
puts "#{row.inspect}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment