Method: FatTable::Table#distinct

Defined in:
lib/fat_table/table.rb

#distinctObject

Return a new table with all duplicate rows eliminated. Resets groups. Same as #uniq.



1102
1103
1104
1105
1106
1107
1108
1109
# File 'lib/fat_table/table.rb', line 1102

def distinct
  result = empty_dup
  uniq_rows = rows.uniq
  uniq_rows.each do |row|
    result << row
  end
  result
end