315件ヒット
[1-100件を表示]
(0.123秒)
別のキーワード
ライブラリ
- csv (315)
クラス
- Array (12)
- CSV (96)
-
CSV
:: Row (63) -
CSV
:: Table (144)
キーワード
- << (12)
- [] (12)
-
by
_ col (12) -
by
_ col! (12) -
by
_ col _ or _ row (12) -
by
_ col _ or _ row! (12) -
by
_ row (12) -
by
_ row! (12) - converters (12)
-
deconstruct
_ keys (3) - empty? (12)
- fields (12)
- gets (12)
-
header
_ converters (12) - headers (36)
- mode (12)
- read (12)
- readline (12)
- readlines (12)
- shift (12)
-
to
_ a (12) -
to
_ csv (12) -
values
_ at (24)
検索結果
先頭5件
-
CSV
:: Row # row -> Array (21202.0) -
同値性を比較するために使用する内部的なデータです。
同値性を比較するために使用する内部的なデータです。 -
CSV
:: Table # by _ row -> CSV :: Table (12346.0) -
ロウモードになっている新しい CSV::Table オブジェクトを返します。
...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, row2])
table # => #<CSV::Table mode:col_or_row row_count:3>
row_table = table.by_row # => #<CSV:......:Table mode:row row_count:3>
row_table[0] # => #<CSV::Row "header1":"row1_1" "header2":"row1_2">
row_table[1] # => #<CSV::Row "header1":"row2_1" "header2":"row2_2">
//}... -
CSV
:: Table # by _ row! -> self (12328.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 # => #<CSV::Table mode:col_or_row row_count:3>
table.by_row!
table # =>......#<CSV::Table mode:row row_count:3>
table[0] # => #<CSV::Row "header1":"row1_1" "header2":"row1_2">
table[1] # => #<CSV::Row "header1":"row2_1" "header2":"row2_2">
//}... -
CSV
:: Table # by _ col _ or _ row -> CSV :: Table (12304.0) -
ミックスモードになっている新しい CSV::Table オブジェクトを返します。
...[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]).by_col!
table # => #<CSV::Table mode:col row_count:3>
col_or_row_table = table.by_col_or_row
col......_or_row_table # => #<CSV::Table mode:col_or_row row_count:3>
table # => #<CSV::Table mode:col row_count:3>
//}... -
CSV
:: Table # by _ col _ or _ row! -> self (12286.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, row2]).by_col!
table # => #<CSV::Table mode:col row_count:3>
table.by_col_or_row!
table......# => #<CSV::Table mode:col_or_row row_count:3>
//}... -
CSV
:: Row # deconstruct _ keys(keys) -> Hash (9219.0) -
パターンマッチに使用するヘッダの名前と値の Hash を返します。
...す。
@param keys パターンマッチに使用するヘッダの名前の配列を指定します。nil の場合は全てをパターンマッチに使用します。
//emlist[例][ruby]{
require "csv"
row = CSV::Row.new([:header1, :header2, :header3], [1, 2, 3])
case row
in { header1: 2.., h... -
CSV
:: Row # empty? -> bool (9117.0) -
内部で保持している @row へ委譲します。
...内部で保持している @row へ委譲します。... -
CSV
:: Table # by _ col -> CSV :: Table (6185.0) -
カラムモードになっている新しい CSV::Table オブジェクトを返します。
...例][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])
col_table = table.by_col
col_table[0] # => ["row1_1", "row2_1"]
col_table[1] # => ["row1_2", "row2_2"]
/... -
CSV
:: Table # by _ col! -> self (6185.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.by_col!
table[0] # => ["row1_1", "row2_1"]
table[1] # => ["row1_2", "row2_2"]
//}... -
CSV
:: Row # fields(*headers _ and _ or _ indices) -> Array (3119.0) -
与えられた引数に対応する値の配列を返します。
...与えられた引数に対応する値の配列を返します。
要素の探索に CSV::Row#field を使用しています。
@param headers_and_or_indices ヘッダの名前かインデックスか Range
のインスタンスか第 1 要素がヘッダの名前......るこ
とができます。
@return 引数を与えなかった場合は全ての要素を返します。
require 'csv'
csv = CSV.new("a,b,c\n1,2,3", headers: true)
table = csv.read
row = table.first
row.values_at("a", 1, 2..3) # => ["1", "2", "3", nil]...