Method: ExtCsv#datasets

Defined in:
lib/extcsv.rb

#datasets(*columns) ⇒ Object

Return an array of datasets, which contain of the values of the gives columns in order of these columns, e.g.

[col0_val0,col1_val0,…],…,[col0_valN, col1_valN,…]


384
385
386
387
388
389
390
391
392
# File 'lib/extcsv.rb', line 384

def datasets(*columns)
  retval = [] 

  # preset the selected columns to select
  columns = datacolumns if columns.empty?

  columns.each {|col| retval << @table[col.to_sym]}
  retval.transpose
end