99件ヒット
[1-99件を表示]
(0.112秒)
クラス
- CSV (22)
-
CSV
:: Table (55) - Matrix (22)
キーワード
-
by
_ col _ or _ row (11) -
by
_ col _ or _ row! (11) -
by
_ row (11) -
by
_ row! (11) - inspect (11)
- read (11)
- readlines (11)
-
row
_ size (11)
検索結果
先頭5件
-
Matrix
# row _ count -> Integer (18102.0) -
行列の行数を返します。
行列の行数を返します。 -
Matrix
# row _ size -> Integer (3002.0) -
行列の行数を返します。
行列の行数を返します。 -
CSV
:: Table # by _ col _ or _ row -> CSV :: Table (19.0) -
ミックスモードになっている新しい CSV::Table オブジェクトを返します。
...der2"], ["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 (13.0) -
自身をミックスモードに変更します。
...er1", "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 # by _ row -> CSV :: Table (13.0) -
ロウモードになっている新しい CSV::Table オブジェクトを返します。
...r2"], ["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":"... -
CSV
:: Table # by _ row! -> self (13.0) -
自身をロウモードに変更します。
...2"], ["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"... -
CSV
# read -> [Array] | CSV :: Table (7.0) -
残りの行を読み込んで配列の配列を返します。 self の生成時に headers オプションに偽でない値が指定されていた場合は CSV::Table オブジェクトを返します。
..._1", "row1_2"], ["row2_1", "row2_2"]]
__END__
header1,header2
row1_1,row1_2
row2_1,row2_2
//}
//emlist[例 headers: true][ruby]{
require "csv"
csv = CSV.new(DATA.read, headers: true)
csv.read
# => #<CSV::Table mode:col_or_row row_count:3>
__END__
header1,header2
row1_1,row1_2
row2_1,row2_2
//}... -
CSV
# readlines -> [Array] | CSV :: Table (7.0) -
残りの行を読み込んで配列の配列を返します。 self の生成時に headers オプションに偽でない値が指定されていた場合は CSV::Table オブジェクトを返します。
..._1", "row1_2"], ["row2_1", "row2_2"]]
__END__
header1,header2
row1_1,row1_2
row2_1,row2_2
//}
//emlist[例 headers: true][ruby]{
require "csv"
csv = CSV.new(DATA.read, headers: true)
csv.read
# => #<CSV::Table mode:col_or_row row_count:3>
__END__
header1,header2
row1_1,row1_2
row2_1,row2_2
//}... -
CSV
:: Table # inspect -> String (7.0) -
モードとサイズを US-ASCII な文字列で返します。
...モードとサイズを US-ASCII な文字列で返します。
//emlist[][ruby]{
require 'csv'
csv = CSV.new("a,b,c\n1,2,3", headers: true)
table = csv.read
p table.inspect # => "#<CSV::Table mode:col_or_row row_count:2>"
//}...