lib/sycsvpro/aggregator.rb
def process_aggregation
      File.new(infile).each_with_index do |line, index|
        result = col_filter.process(row_filter.process(line.chomp, row: index))
        unless result.nil? or result.empty?
          if heading.empty? and not headerless
            heading << result.split(';')
            next
          else
            @sum_col = [result.split(';').size, sum_col].max 
          end
          key_values[result]  += 1
          sums[sum_col_title] += 1
        end
      end
      heading.flatten!
      heading[sum_col] = sum_col_title
    end
def process_aggregation
      File.new(infile).each_with_index do |line, index|
        result = col_filter.process(row_filter.process(line.chomp, row: index))
        unless result.nil? or result.empty?
          if heading.empty? and not headerless
            heading << result.split(';')
            next
          else
            @sum_col = [result.split(';').size, sum_col].max 
          end
          key_values[result]  += 1
          sums[sum_col_title] += 1
        end
      end
      heading.flatten!
      heading[sum_col] = sum_col_title
    end
Process the aggregation of the key values. The result will be written to
 _outfile_