Skip to content

Instantly share code, notes, and snippets.

@ismasan
Created September 23, 2014 11:07
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 ismasan/1676cb1bcfd6c2cad922 to your computer and use it in GitHub Desktop.
Save ismasan/1676cb1bcfd6c2cad922 to your computer and use it in GitHub Desktop.
# http://stackoverflow.com/questions/6005139/ruby-1-9-2-read-and-parse-a-remote-csv
require 'rubygems'
require 'open-uri'
require 'csv'
def read(url)
CSV.new(open(url), :headers => :first_row).each do |line|
puts line
puts line[0]
puts line['FEB11']
end
end
read("http://www.euribor-ebf.eu/assets/modules/rateisblue/processed_files/myav_EURIBOR_2011.csv")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment