るりまサーチ

最速Rubyリファレンスマニュアル検索!
120件ヒット [101-120件を表示] (0.008秒)
トップページ > クエリ:row[x] > クエリ:fields[x]

別のキーワード

  1. matrix row
  2. csv header_row?
  3. row []=
  4. csv row
  5. csv row_sep

ライブラリ

クラス

キーワード

検索結果

<< < 1 2 >>

CSV (66.0)

このクラスは CSV ファイルやデータに対する完全なインターフェイスを提供します。

...ずつ
CSV.foreach("sample.csv") do |row|
p row
end
# => ["Ruby", "1995"]
# ["Rust", "2010"]

# ファイルから一度に
p CSV.read("sample.csv")
# => [["Ruby", "1995"], ["Rust", "2010"]]

# 文字列から一行ずつ
CSV.parse(csv_text) do |row|
p row
end
# => ["Ruby", "1995"]
# ["Rus...
...SV.open("path/to/file.csv", "wb") do |csv|
csv << ["row", "of", "CSV", "data"]
csv << ["another", "row"]
# ...
end

# 文字列へ書き込み
csv_string = CSV.generate do |csv|
csv << ["row", "of", "CSV", "data"]
csv << ["another", "row"]
# ...
end
//}

=== 一行変換

//emlist[][ruby...
...is not ASCII compatible. There's no existing data for CSV to use to
prepare itself and thus you will probably need to manually specify the desired
Encoding for most of those cases. It will try to guess using the fields in a
row
of output though, when using CSV::generate_line() or Array#to_csv()....

CSV::DEFAULT_OPTIONS -> Hash (12.0)

このオプションは呼び出し側で上書きしなかったときに使用するオプションです。

...側で上書きしなかったときに使用するオプションです。

: :col_sep
","
: :row_sep
:auto
: :quote_char
'"'
: :field_size_limit
nil
: :converters
nil
: :unconverted_fields
nil
: :headers
false
: :return_headers
false
: :header_converters
nil
: :skip_blanks
fals...
<< < 1 2 >>