16件ヒット
[1-16件を表示]
(0.048秒)
クラス
- CSV (9)
-
CSV
:: FieldInfo (2) -
CSV
:: Row (3) -
CSV
:: Table (2)
検索結果
先頭5件
-
CSV
# fileno -> Integer (613.0) -
IO#fileno, IO#to_i に委譲します。
IO#fileno, IO#to_i に委譲します。 -
CSV
# pos -> Integer (613.0) -
IO#pos, IO#tell に委譲します。
IO#pos, IO#tell に委譲します。
@see IO#pos, IO#tell -
CSV
# tell -> Integer (613.0) -
IO#pos, IO#tell に委譲します。
IO#pos, IO#tell に委譲します。
@see IO#pos, IO#tell -
CSV
# to _ i -> Integer (613.0) -
IO#fileno, IO#to_i に委譲します。
IO#fileno, IO#to_i に委譲します。 -
CSV
:: Row # length -> Integer (613.0) -
Array#length, Array#size に委譲します。
Array#length, Array#size に委譲します。
@see Array#size -
CSV
:: Row # size -> Integer (613.0) -
Array#length, Array#size に委譲します。
Array#length, Array#size に委譲します。
@see Array#size -
CSV
:: Table # length -> Integer (613.0) -
(ヘッダを除く)行数を返します。
...(ヘッダを除く)行数を返します。
Array#length, Array#size に委譲しています。
//emlist[][ruby]{
require 'csv'
csv = CSV.new("a,b,c\n1,2,3", headers: true)
table = csv.read
p table.size # => 1
//}
@see Array#length, Array#size... -
CSV
:: Table # size -> Integer (613.0) -
(ヘッダを除く)行数を返します。
...(ヘッダを除く)行数を返します。
Array#length, Array#size に委譲しています。
//emlist[][ruby]{
require 'csv'
csv = CSV.new("a,b,c\n1,2,3", headers: true)
table = csv.read
p table.size # => 1
//}
@see Array#length, Array#size... -
CSV
# fcntl(cmd , arg = 0) -> Integer (610.0) -
IO#fcntl に委譲します。
IO#fcntl に委譲します。 -
CSV
# field _ size _ limit -> Integer (610.0) -
フィールドサイズの最大値を返します。
...csv"
csv = CSV.new(DATA)
csv.field_size_limit # => nil
p csv.read # => [["a", "b"], ["\n2\n2\n", ""]]
DATA.rewind
csv = CSV.new(DATA, field_size_limit: 4)
p csv.field_size_limit # => 4
csv.read # => #<CSV::MalformedCSVError: Field size exceeded on line 2.>
__END__
"a","b"
"
2
2
",""
//}
@see CSV... -
CSV
# ioctl(cmd , arg = 0) -> Integer (610.0) -
IO#ioctl に委譲します。
IO#ioctl に委譲します。
@see IO#ioctl -
CSV
# lineno -> Integer (610.0) -
このファイルから読み込んだ最終行の行番号を返します。 フィールドに含まれる改行はこの値には影響しません。
...このファイルから読み込んだ最終行の行番号を返します。
フィールドに含まれる改行はこの値には影響しません。
//emlist[例][ruby]{
require "csv"
csv = CSV.new("header1,header2\nrow1_1,row1_2")
csv.lineno # => 0
csv.readline
csv.lineno # => 1
//}... -
CSV
# pid -> Integer | nil (610.0) -
IO#pid に委譲します。
IO#pid に委譲します。
@see IO#pid -
CSV
:: FieldInfo # index -> Integer (610.0) -
行内で何番目のフィールドかわかるゼロベースのインデックスを返します。
...クスを返します。
//emlist[例][ruby]{
require 'csv'
csv = CSV.new("date1,date2\n2018-07-09,2018-07-10", headers: true)
csv.convert do |field,field_info|
p field_info.index
Date.parse(field)
end
p csv.first
# => 0
# => 1
# => #<CSV::Row "date1":#<Date: 2018-07-09 ((2458309j,0s,0n),+0s,... -
CSV
:: FieldInfo # line -> Integer (610.0) -
行番号を返します。
...。
//emlist[例][ruby]{
require 'csv'
csv = CSV.new("date1,date2,date3\n2018-07-09,2018-07-10\n2018-08-09,2018-08-10", headers: true)
csv.convert do |field,field_info|
p field_info.line
Date.parse(field)
end
p csv.to_a
# => 2
# => 2
# => 3
# => 3
# => [#<CSV::Row "date1":#<Date: 2018-07-09 (... -
CSV
:: Row # index(header , minimum _ index = 0) -> Integer (610.0) -
与えられたヘッダの名前に対応するインデックスを返します。
...の名前を探します。
重複しているヘッダがある場合に便利です。
//emlist[例][ruby]{
require "csv"
row = CSV::Row.new(["header1", "header2", "header1"], [1, 2, 3])
row.index("header1") # => 0
row.index("header1", 1) # => 2
//}
@see CSV::Row#field...