143件ヒット
[1-100件を表示]
(0.087秒)
クラス
- CSV (44)
-
CSV
:: Table (99)
キーワード
- [] (33)
- binmode (11)
- binmode? (11)
-
by
_ col _ or _ row (11) -
by
_ col _ or _ row! (11) -
by
_ row (11) -
by
_ row! (11) - inspect (11)
- read (11)
- readlines (11)
検索結果
先頭5件
-
CSV
:: Table # mode -> Symbol (21216.0) -
現在のアクセスモードを返します。
...現在のアクセスモードを返します。
//emlist[例][ruby]{
require "csv"
row = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
table = CSV::Table.new([row])
table.mode # => :col_or_row
table.by_col!
table.mode # => :col
//}... -
CSV
# binmode -> self (6203.0) -
IO#binmode に委譲します。
...IO#binmode に委譲します。
@see IO#binmode... -
CSV
# binmode? -> bool (6203.0) -
IO#binmode? に委譲します。
...IO#binmode? に委譲します。
@see IO#binmode?... -
CSV
:: Table # by _ col _ or _ row -> CSV :: Table (6121.0) -
ミックスモードになっている新しい CSV::Table オブジェクトを返します。
...ミックスモードになっている新しい 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]).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 (6115.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]).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
:: Table # [](header) -> [String] | [nil] (3121.0) -
ミックスモードでは、このメソッドは引数に行番号を指定すれば行単位で動作 し、ヘッダの名前を指定すれば列単位で動作します。
...ッダの名前を指定すれば列単位で動作します。
このメソッドを呼び出す前に CSV::Table#by_col! を呼び出すとカラム
モードになります。また CSV::Table#by_row! を呼び出すとロウモード
になります。
@param index ミックスモード・ロ......//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])
# ミックスモード
p table.mode # => :col_or_row
p table[0] # => #<CSV::Ro......p table[1] # => #<CSV::Row "header1":"row2_1" "header2":"row2_2">
p table["header2"] # => ["row1_2", "row2_2"]
p table[0..1] # => [#<CSV::Row "header1":"row1_1" "header2":"row1_2">, #<CSV::Row "header1":"row2_1" "header2":"row2_2">]
# カラムモード
table.by_col!
p table.mode... -
CSV
:: Table # [](index) -> CSV :: Row | [String] | nil (3121.0) -
ミックスモードでは、このメソッドは引数に行番号を指定すれば行単位で動作 し、ヘッダの名前を指定すれば列単位で動作します。
...ッダの名前を指定すれば列単位で動作します。
このメソッドを呼び出す前に CSV::Table#by_col! を呼び出すとカラム
モードになります。また CSV::Table#by_row! を呼び出すとロウモード
になります。
@param index ミックスモード・ロ......//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])
# ミックスモード
p table.mode # => :col_or_row
p table[0] # => #<CSV::Ro......p table[1] # => #<CSV::Row "header1":"row2_1" "header2":"row2_2">
p table["header2"] # => ["row1_2", "row2_2"]
p table[0..1] # => [#<CSV::Row "header1":"row1_1" "header2":"row1_2">, #<CSV::Row "header1":"row2_1" "header2":"row2_2">]
# カラムモード
table.by_col!
p table.mode... -
CSV
:: Table # [](range) -> [CSV :: Row]| [Array] | nil (3121.0) -
ミックスモードでは、このメソッドは引数に行番号を指定すれば行単位で動作 し、ヘッダの名前を指定すれば列単位で動作します。
...ッダの名前を指定すれば列単位で動作します。
このメソッドを呼び出す前に CSV::Table#by_col! を呼び出すとカラム
モードになります。また CSV::Table#by_row! を呼び出すとロウモード
になります。
@param index ミックスモード・ロ......//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])
# ミックスモード
p table.mode # => :col_or_row
p table[0] # => #<CSV::Ro......p table[1] # => #<CSV::Row "header1":"row2_1" "header2":"row2_2">
p table["header2"] # => ["row1_2", "row2_2"]
p table[0..1] # => [#<CSV::Row "header1":"row1_1" "header2":"row1_2">, #<CSV::Row "header1":"row2_1" "header2":"row2_2">]
# カラムモード
table.by_col!
p table.mode... -
CSV
:: Table # by _ row -> CSV :: Table (3115.0) -
ロウモードになっている新しい CSV::Table オブジェクトを返します。
...ロウモードになっている新しい 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 (3115.0) -
自身をロウモードに変更します。
...list[例][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">
//}...