744件ヒット
[1-100件を表示]
(0.086秒)
種類
- インスタンスメソッド (564)
- 特異メソッド (168)
- 定数 (12)
ライブラリ
- csv (744)
キーワード
- << (12)
-
DEFAULT
_ OPTIONS (12) -
add
_ row (12) - binmode (12)
- binmode? (12)
- close (12)
-
close
_ read (12) -
close
_ write (12) - closed? (12)
-
col
_ sep (12) - convert (24)
- each (12)
- eof (12)
- eof? (12)
-
external
_ encoding (12) - fcntl (12)
-
field
_ size _ limit (12) - fileno (12)
- filter (36)
- flock (12)
- flush (12)
-
force
_ quotes? (12) - foreach (12)
- fsync (12)
-
generate
_ line (12) -
header
_ convert (24) -
header
_ row? (12) - headers (12)
-
internal
_ encoding (12) - ioctl (12)
- isatty (12)
- lineno (12)
- open (48)
- parse (12)
-
parse
_ line (12) - pid (12)
- puts (12)
- read (24)
- readline (12)
- readlines (24)
- reopen (12)
-
return
_ headers? (12) -
skip
_ blanks? (12) - stat (12)
- sync (12)
- table (12)
- tell (12)
-
to
_ i (12) -
to
_ io (12) - truncate (12)
- tty? (12)
-
unconverted
_ fields? (12) -
write
_ headers? (12)
検索結果
先頭5件
-
CSV
. parse _ line(line , options = Hash . new) -> Array (6201.0) -
このメソッドは一行の CSV 文字列を配列に変換するためのショートカットです。
...このメソッドは一行の CSV 文字列を配列に変換するためのショートカットです。
@param line 文字列を指定します。複数行の文字列を指定した場合は、一行目以外は無視します。
@param options CSV.new のオプションと同じオプショ......ンを指定できます。
//emlist[例][ruby]{
require 'csv'
p CSV.parse_line("1,taro,tanaka,20")
# => ["1", "taro", "tanaka", "20"]
p CSV.parse_line("1|taro|tanaka|20", col_sep: '|')
# => ["1", "taro", "tanaka", "20"]
# 列をダブルクオートで囲むとその中にカンマや改行を......含める事もできる。
# 他の仕様も含め詳しくはRFC4180を参照。
p CSV.parse_line("1,\"ta,ro\",\"tana\nka\", 20")
# => ["1", "ta,ro", "tana\nka", " 20"]
//}... -
CSV
. table(path , options = Hash . new) -> CSV :: Table | [Array] (6201.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
# close -> nil (6101.0) -
IO#close に委譲します。
...IO#close に委譲します。
@see IO#close... -
CSV
# close _ read -> nil (6101.0) -
IO#close_read に委譲します。
...IO#close_read に委譲します。
@see IO#close_read... -
CSV
# close _ write -> nil (6101.0) -
IO#close_write に委譲します。
...IO#close_write に委譲します。
@see IO#close_write... -
CSV
# closed? -> bool (6101.0) -
IO#closed? に委譲します。
...IO#closed? に委譲します。
@see IO#closed?... -
CSV
# col _ sep -> String (6101.0) -
カラム区切り文字列として使用する文字列を返します。
...す。
//emlist[例][ruby]{
require "csv"
users =<<-EOS
id|first name|last name|age
1|taro|tanaka|20
2|jiro|suzuki|18
3|ami|sato|19
4|yumi|adachi|21
EOS
csv = CSV.new(users, headers: true, col_sep: "|")
csv.col_sep # => "|"
csv.first.to_a # => [["id", "1"], ["first name", "taro"], ["last name", "......tanaka"], ["age", "20"]]
csv = CSV.new(users, headers: true)
csv.col_sep # => ","
csv.first.to_a # => [["id|first name|last name|age", "1|taro|tanaka|20"]]
//}
@see CSV.new... -
CSV
# external _ encoding -> Encoding | nil (6101.0) -
IO#external_encoding に委譲します。
...IO#external_encoding に委譲します。... -
CSV
# fcntl(cmd , arg = 0) -> Integer (6101.0) -
IO#fcntl に委譲します。
...IO#fcntl に委譲します。...