るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.017秒)

別のキーワード

  1. rss content=
  2. rss content
  3. net/imap content_id
  4. items content
  5. item content

ライブラリ

クラス

検索結果

CSV.filter(input, options = Hash.new) {|row| ... } (18121.0)

このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。

...rue, write_headers: true }

CSV.filter(options) do |row|
if row.header_row?
row << "header3"
next
end
row << "row1_3"
end

# => header1,header2,header3
# row1_1,row1_2,row1_3
//}

//emlist[例: input, output を指定する][ruby]{
require "csv"
content =
<<EOS
id,first name,last name,...
...,18
3,ami,sato,19
4,yumi,adachi,21
EOS

File.write('test.csv',content)
options = { headers: true, return_headers: true, write_headers: true }

CSV.filter(File.open("test.csv"), File.open("out.csv", "w"), options) do |row|
if row.header_row?
row << "full name"
next
end
row << row["first...

CSV.filter(input, output, options = Hash.new) {|row| ... } (18121.0)

このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。

...rue, write_headers: true }

CSV.filter(options) do |row|
if row.header_row?
row << "header3"
next
end
row << "row1_3"
end

# => header1,header2,header3
# row1_1,row1_2,row1_3
//}

//emlist[例: input, output を指定する][ruby]{
require "csv"
content =
<<EOS
id,first name,last name,...
...,18
3,ami,sato,19
4,yumi,adachi,21
EOS

File.write('test.csv',content)
options = { headers: true, return_headers: true, write_headers: true }

CSV.filter(File.open("test.csv"), File.open("out.csv", "w"), options) do |row|
if row.header_row?
row << "full name"
next
end
row << row["first...

CSV.filter(options = Hash.new) {|row| ... } (18121.0)

このメソッドは CSV データに対して Unix のツール群のようなフィルタを構築 するのに便利です。

...rue, write_headers: true }

CSV.filter(options) do |row|
if row.header_row?
row << "header3"
next
end
row << "row1_3"
end

# => header1,header2,header3
# row1_1,row1_2,row1_3
//}

//emlist[例: input, output を指定する][ruby]{
require "csv"
content =
<<EOS
id,first name,last name,...
...,18
3,ami,sato,19
4,yumi,adachi,21
EOS

File.write('test.csv',content)
options = { headers: true, return_headers: true, write_headers: true }

CSV.filter(File.open("test.csv"), File.open("out.csv", "w"), options) do |row|
if row.header_row?
row << "full name"
next
end
row << row["first...