I am new in ruby so please forgive the noobishness.
I have a CSV with two columns. One for animal name and one for animal type. I have a hash with all the keys being
Try this:
require 'csv' data = { 'one' => '1', 'two' => '2', 'three' => '3' } CSV.open("data.csv", "a+") do |csv| csv << data.keys csv << data.values end