Rubyã§CSVãæ±ãå ´åã¯æ¨æºã©ã¤ãã©ãªã®CSVããFasterCSVã使ããã¨ãå¤ãã¨æãã¾ããã©ã¡ãã®ã©ã¤ãã©ãªã以ä¸ã®ãããªæãã§CSVã®1è¡ãé
åã«ãã¦ãããã¯ã«æ¸¡ãã¦ããã¾ãã CSV.open("test.csv", 'r') do |row| p row # => ["Yamada", "30", "180"] p row[0] # => "Yamada" p row[1] # => "30" p row[2] # => "180" end ãã®ã¨ãCSVã®ã«ã©ã æ°ãå°ãªããã°row[0], row[1]ã®ããã«ãã¦é
åã®ã¤ã³ããã¯ã¹ã¢ã¯ã»ã¹ã§ååãªã®ã§ãããã«ã©ã æ°ãå¤ããªãã¨ããã®ãã¼ã¿ã¯ä½ã«ã©ã ç®ã«ããã ã£ã? ã¨ãªããã¨ãããããã¾ãã ããã§ããã·ã¥ã§ããã ä¾ãã°ãCSVãã¼ã¿ãååãå¹´é½¢ã身é·ã®é ã«ä¸¦ãã§ãããªãã以ä¸ã®ããã«ã«ã©ã åããã¼ã¨ããããã·ã¥ã«ãã
{{#tags}}- {{label}}
{{/tags}}