L
Li Chen
Hi all,
I need to read a CSV file with csv library. And I tried the example from
the library.
require 'csv'
CSV::Reader.parse(File.open('test.csv')) do |row|
puts row
# break if !row[0].is_null && row[0].data == 'stop'
end
Here is what I got:
#<CSV::Cell:0x2b7c350>
...
#<CSV::Cell:0x2b78b4c>
I wonder why I can't print out the string/row itself instead of the
address of the string/row.
Thanks,
Li
I need to read a CSV file with csv library. And I tried the example from
the library.
require 'csv'
CSV::Reader.parse(File.open('test.csv')) do |row|
puts row
# break if !row[0].is_null && row[0].data == 'stop'
end
Here is what I got:
#<CSV::Cell:0x2b7c350>
...
#<CSV::Cell:0x2b78b4c>
I wonder why I can't print out the string/row itself instead of the
address of the string/row.
Thanks,
Li