33件ヒット
[1-33件を表示]
(0.115秒)
検索結果
先頭3件
-
CSV
# header _ converters -> Array (30426.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
. table(path , options = Hash . new) -> CSV :: Table | [Array] (218.0) -
以下と同等のことを行うメソッドです。
...行うメソッドです。
//emlist[][ruby]{
CSV.read( path, { headers: true,
converters: :numeric,
header_converters: :symbol }.merge(options) )
//}
@param path ファイル名を指定します。
@param options CSV.new のオプションと......同じオプションを指定できます。
@see CSV.read... -
CSV
. new(data , options = Hash . new) -> CSV (166.0) -
このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。
...読み込んだり、書き出したりするために
String か IO のインスタンスをラップします。
ラップされた文字列の先頭から読み込むことになります。
文字列に追記したい場合は CSV.generate を使用してください。
他の位置から処理......or the stream is only available for output, the default
$INPUT_RECORD_SEPARATOR ($/) is used. Obviously,
discovery takes a little time. Set manually if speed is important. Also
note that IO objects should be opened in binary mode on Windows if this
feature will be used as the line-e......SV will raise a
MalformedCSVError, assuming the data is faulty. You can use this limit to
prevent what are effectively DoS attacks on the parser. However, this
limit can cause a legitimate parse to fail and thus is set to +nil+, or off,
by default.
: :converters
CSV::Converters から...