るりまサーチ

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

別のキーワード

  1. csv open
  2. csv convert
  3. csv filter
  4. csv header_convert
  5. csv each

ライブラリ

クラス

キーワード

検索結果

<< < 1 2 >>

CSV::Table#by_row! -> self (14115.0)

自身をロウモードに変更します。

...quire "csv"

row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
table
= CSV::Table.new([row1, row2])
table
# => #<CSV::Table mode:col_or_row row_count:3>
table
.by_row!
table
# => #<CSV::Table mode:row ro...
...w_count:3>
table
[0] # => #<CSV::Row "header1":"row1_1" "header2":"row1_2">
table
[1] # => #<CSV::Row "header1":"row2_1" "header2":"row2_2">
//}...

CSV::Table#by_col_or_row! -> self (14091.0)

自身をミックスモードに変更します。

..."csv"

row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
table
= CSV::Table.new([row1, row2]).by_col!
table
# => #<CSV::Table mode:col row_count:3>
table
.by_col_or_row!
table
# => #<CSV::Table...

CSV::Table#inspect -> String (14055.0)

モードとサイズを US-ASCII な文字列で返します。

...モードとサイズを US-ASCII な文字列で返します。

//emlist[][ruby]{
require 'csv'
csv
= CSV.new("a,b,c\n1,2,3", headers: true)
table
= csv.read
p table.inspect # => "#<CSV::Table mode:col_or_row row_count:2>"
//}...
<< < 1 2 >>