On Sep 16, 2009, at 12:11 PM, Dot Baiki wrote:

> Good day
>
> Thanks to Mr. James Edward Gray II, I understand more and more :-)

I'm glad to hear it.

> After trying to create an array of arrays, I got stuck again. It  
> seems I
> can't properly create such an array. This is my mistake:
>
> data = FCSV.table(input_file)

When you execute the above line you read all of the data into memory.   
You would not need to do any more reading, like making calls to  
FCSV.foreach().

> I saw that FasterCSV.foreach creates an array/hash/something?
> #<FasterCSV::Table mode:col_or_row row_count:14>

The data variable above holds a FasterCSV::Table which is a container  
for some FasterCSV::Row objects.  They represent your data.

> If I want an array which contains all records from one employee,  
> should
> I use FasterCSV's filter class method?

You could grab the records for one employee using code like:

   employee1s_records = data.select { |row| row["id"] == 1 }

Hope that helps.

James Edward Gray II