FasterCSV heavy loads?
- From: Michael Linfield <globyy3000@xxxxxxxxxxx>
- Date: Wed, 2 Apr 2008 03:08:47 -0500
Recently I've attempted to push a huge csv into arrays via code that
looks along the lines of this:
csvFile = FasterCSV.read('data.csv', :headers => true)
array = []
csvFile.each do |row|
array << row['column_name']
end
The problem arises when the csv file is someodd 2 million lines or more.
Normally I would comment about how long it took but I decided to call it
quits after 9 hours of waiting lol. Any ideas on how to handle columns
in CSV docs the same way FasterCSV does?
(And yes, theoretically I could split the 80mb csv into 20 4mb files but
whats the accomplishment in that!)
Thanks,
- Mac
--
Posted via http://www.ruby-forum.com/.
.
- Follow-Ups:
- Re: FasterCSV heavy loads?
- From: James Gray
- Re: FasterCSV heavy loads?
- From: Mike Woodhouse
- Re: FasterCSV heavy loads?
- Prev by Date: Re: wxruby: paint monochrome bitmaps in other colors
- Next by Date: Re: Sun's Overview of Ruby and JRuby
- Previous by thread: wxruby: paint monochrome bitmaps in other colors
- Next by thread: Re: FasterCSV heavy loads?
- Index(es):
Relevant Pages
|