def count_csv(*include_fields)
      fields = count_report.keys
      fields.select! { |f| include_fields.include? f } unless
        include_fields.empty?

      variables = [:value, :count]
      headers = fields.product(variables).map { |header| header.join(' ') }

      table = CSV::Table.new([CSV::Row.new(headers, [], true)])
      return table if count_report.nil? || count_report.empty?

      rows = []

      count_report.each do |field, hash|
        hash.to_a.each_with_index do |value, i|
          rows[i] ||= CSV::Row.new(headers, [])
          rows[i]["#{field} value"] = value.first.to_s
          rows[i]["#{field} count"] = value.last
        end
      end

      rows.each { |r| table << r }
      table
    end
def count_csv(*include_fields)
      fields = count_report.keys
      fields.select! { |f| include_fields.include? f } unless
        include_fields.empty?

      variables = [:value, :count]
      headers = fields.product(variables).map { |header| header.join(' ') }

      table = CSV::Table.new([CSV::Row.new(headers, [], true)])
      return table if count_report.nil? || count_report.empty?

      rows = []

      count_report.each do |field, hash|
        hash.to_a.each_with_index do |value, i|
          rows[i] ||= CSV::Row.new(headers, [])
          rows[i]["#{field} value"] = value.first.to_s
          rows[i]["#{field} count"] = value.last
        end
      end

      rows.each { |r| table << r }
      table
    end
@param include_fields

 @return [CSV::Table] a table containing values and their counts
   for each included field