2件ヒット
[1-2件を表示]
(0.170秒)
別のキーワード
ライブラリ
- csv (2)
検索結果
-
CSV
:: Table # to _ a -> [Array] (63628.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 (9625.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"]]
//}...