33件ヒット
[1-33件を表示]
(0.036秒)
検索結果
先頭3件
-
CSV
# header _ converters -> Array (18121.0) -
現在有効なヘッダ用変換器のリストを返します。
...ェクトを返します。
//emlist[例][ruby]{
require "csv"
csv = CSV.new("HEADER1,HEADER2\nrow1_1,row1_2", headers: true, header_converters: CSV::HeaderConverters.keys)
csv.header_converters # => [:downcase, :symbol]
csv.read.to_a # => header2], ["row1_1", "row1_2"
//}
@see CSV.new... -
CSV
. new(data , options = Hash . new) -> CSV (26.0) -
このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。
...このメソッドは CSV ファイルを読み込んだり、書き出したりするために
String か IO のインスタンスをラップします。
ラップされた文字列の先頭から読み込むことになります。
文字列に追記したい場合は CSV.generate を使用し......f this
feature will be used as the line-ending translation can cause
problems with resetting the document position to where it was before the
read ahead. This String will be transcoded into the data's Encoding before parsing.
: :quote_char
フィールドをクオートする文字を指......すると、ヘッダ行を
ヘッダと値が同一の CSV::Row のインスタンスとして返します。
: :write_headers
真を指定して :headers にも値をセットすると、ヘッダを出力します。
: :header_converters
:converters オプションに似ていますが、... -
CSV
. table(path , options = Hash . new) -> CSV :: Table | [Array] (20.0) -
以下と同等のことを行うメソッドです。
...ッドです。
//emlist[][ruby]{
CSV.read( path, { headers: true,
converters: :numeric,
header_converters: :symbol }.merge(options) )
//}
@param path ファイル名を指定します。
@param options CSV.new のオプションと同じオプ......ションを指定できます。
@see CSV.read...