wataradioの日記
wataradioの日記
Subscribe

wataradioの日記

Entries from 2008-07-06 to 1 day

2008-07-06

RubyでCSVを扱うときは配列をハッシュにすると便利な件

Ruby

RubyでCSVを扱う場合は標準ライブラリのCSVか、FasterCSVを使うことが多いと思います。どちらのライブラリも以下のような感じでCSVの1行を配列にしてブロックに渡してくれます。 CSV.open("test.csv", 'r') do |row| p row # => ["Yamada", "30", "180"] p r…

Hatena Bookmark - RubyでCSVを扱うときは配列をハッシュにすると便利な件
Profile
id:wataradio id:wataradio
Subscribed unsubscribe Subscribe Subscribe
About this blog
Search
Links
  • Hatena Blog
  • ブログをはじめる
  • Weekly Hatena Blog
  • Hatena Blog Pro
Recent Entries
  • eclipse + scala-2.8.0.RC3 + scalatest-1.2-for-scala-2.8.0.RC3-SN
  • Ruby勉強会@札幌-12に参加してきました
  • msvcr90d.dll not found
  • RubyでCSVを扱うときは配列をハッシュにすると便利な件
  • Unicodeの数値文字参照をUTF-8とかUTF-16に変換する
Archive
  • ▼ ▶
    2010
    • 2010 / 6
    • 2010 / 1
  • ▼ ▶
    2008
    • 2008 / 9
    • 2008 / 7
    • 2008 / 6
    • 2008 / 5
wataradioの日記 wataradioの日記

Powered by Hatena Blog | ブログを報告する

Quote saved.

Login to quote this blog

Failed to save quote. Please try again later.

You cannot quote because this article is private.

Subscribed unsubscribe Subscribe Subscribe