3件ヒット
[1-3件を表示]
(0.028秒)
検索結果
先頭3件
-
CSV
:: Table # to _ a -> [Array] (54628.0) -
配列の配列を返します。
...。
//emlist[例][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
table = CSV::Table.new([row1, row2])
table.to_a # => [["header1", "header2"], ["row1_1", "row1_2"], ["row2_1", "row2_2"]]
//}... -
CSV
:: Table # <<(row _ or _ array) -> self (343.0) -
自身の最後に新しい行を追加します。
...mlist[例][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
table = CSV::Table.new([row1])
table << row2
table.to_a # => [["header1", "header2"], ["row1_1", "row1_2"], ["row2_1", "row2_2"]]
//}... -
CSV
:: Table . new(array _ of _ rows) -> CSV :: Table (343.0) -
自身を初期化します。
...。
//emlist[例][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
table = CSV::Table.new([row1, row2])
table.to_a # => [["header1", "header2"], ["row1_1", "row1_2"], ["row2_1", "row2_2"]]
//}...