399件ヒット
[1-100件を表示]
(0.028秒)
別のキーワード
種類
- インスタンスメソッド (315)
- 特異メソッド (72)
- 文書 (12)
クラス
- Array (12)
- CSV (132)
-
CSV
:: Row (63) -
CSV
:: Table (156) - Matrix (24)
キーワード
- << (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)
- empty? (12)
- fields (12)
- gets (12)
-
header
_ converters (12) - headers (36)
- mode (12)
- new (12)
- parse (12)
- read (24)
- readline (12)
- readlines (24)
- rows (12)
-
ruby 1
. 8 . 2 feature (12) - shift (12)
-
to
_ a (12) -
to
_ csv (12) -
values
_ at (24)
検索結果
先頭5件
-
CSV
:: Row # row -> Array (21201.0) -
同値性を比較するために使用する内部的なデータです。
同値性を比較するために使用する内部的なデータです。 -
CSV
:: Table # by _ row -> CSV :: Table (12345.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 (12327.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 (12303.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 (12285.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 (9218.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 (9116.0) -
内部で保持している @row へ委譲します。
...内部で保持している @row へ委譲します。... -
Matrix
. rows(rows , copy = true) -> Matrix (6300.0) -
引数 rows を行ベクトルの列とする行列を生成します。
...引数 rows を行ベクトルの列とする行列を生成します。
引数 copy が偽(false)ならば、rows の複製を行いません。
//emlist[例][ruby]{
require 'matrix'
a1 = [1, 2, 3]
a2 = [10, 15, 20]
m = Matrix.rows([a1, a2], false) # 配列を複製せずに行列を生成
p m......# => Matrix[[1, 2, 3], [10, 15, 20]]
a2[1] = 1000 # 配列のデータを変更
p m # => Matrix[[1, 2, 3], [10, 1000, 20]]
//}
@param rows 配列の配列
@param copy 配列を複製するかどうかを真偽値で指定... -
Matrix
. empty(row _ size=0 , column _ size=0) -> Matrix (6219.0) -
要素を持たない行列を返します。
...数もしくは列数が0の行列のことです。
row_size 、 column_size のいずれか一方は0である必要があります。
//emlist[例][ruby]{
require 'matrix'
m = Matrix.empty(2, 0)
m == Matrix[ [], [] ]
# => true
n = Matrix.empty(0, 3)
n == Matrix.columns([ [], [], [] ])
# => true......m * n
# => Matrix[[0, 0, 0], [0, 0, 0]]
//}
@param row_size 行列の行数
@param column_size 行列の列数
@raise ArgumentError row_size, column_size が両方とも0でない場合に発生します... -
CSV
:: Table # by _ col -> CSV :: Table (6184.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"]
/...