るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.019秒)
トップページ > クエリ:Hash[x] > クラス:CSV::Row[x]

別のキーワード

  1. _builtin hash
  2. hash []
  3. dbm to_hash
  4. matrix hash
  5. _builtin to_hash

ライブラリ

キーワード

検索結果

CSV::Row#to_hash -> Hash (6209.0)

自身をシンプルなハッシュに変換します。

...プルなハッシュに変換します。

フィールドの順序は無視されます。
重複したフィールドは削除されます。

//emlist[例][ruby]{
require "csv"

row = CSV::Row.new(["header2", "header1", "header2"], [1, 2, 3])
row.to_hash # => {"header2"=>3, "header1"=>2}
//}...

CSV::Row#<<(arg) -> self (7.0)

自身に与えられたデータを追加します。

...列を指定][ruby]{
require "csv"

row = CSV::Row.new([], [], true)

row << ["header1", "row1_1"]
row << ["header2", "row1_2"]
row.to_a # => [["header1", "row1_1"], ["header2", "row1_2"]]
//}

//emlist[例 Hash を指定][ruby]{
require "csv"

row = CSV::Row.new([], [], true)

row << { "header1" =>...