I am taking a symbol and requesting Yahoo Finance web service to get the data for that symbol(company).
It is returning a CSV::Table
when I do the following operation:
symbols_list.each{|symbol|
table= CSV.parse open("http://ichart.finance.yahoo.com/table.csv?s=#{URI.encode(symbol)}").read, :headers=>true, :converters=>:numeric
The output is a CSV::Table
with headers for each row. However, I want to extract only the first row from the results and get a part of that row.
I have tried using table.push
but it is printing up all the rows instead of one.