ruby-2.0.0-p0 CSVãèªã¿è¾¼ãæã«é åè¦ç´ çªå·ã§æ¾ãã¨å¾ã§èªãæ°ãããªããªãã¾ãã # test.csv id, name 1, a 2, b 3, c# array_to_hash.rb require "csv" csv = CSV.open("test.csv") header = csv.shift csv.each do |row| p Hash[header.zip(row)] end $ ruby array_to_hash.rb {"id"=>"1", " name"=>" a"} {"id"=>"2", " name"=>" b"} {"id"=>"3", " name"=>" c"} åèè¨äº http://d.hatena.ne.jp/wataradio/20080706/1215358772 Wordpressã®ãã¼ã¿ãã¼ã¹ããè¨äºãã«ãã´ãªãã¿ã°ãã¢
{{#tags}}- {{label}}
{{/tags}}