James Gray
4/2/2008 3:11:00 AM
On Apr 1, 2008, at 9:10 PM, Ronald Steckly wrote:
> So maybe I spoke too soon when I said I had the csv part of this =20
> handled.
No worries, we'll fix you up=85
> I've read the FasterCSV docs and, for the life of me, can't figure =20
> out how to return values by header. Here's the script:
>
> require 'rubygems'
> require 'fastercsv'
>
> a=3DFasterCSV.table("\/Users\/ron\/snlusgam.csv").by_col
>
> b=3Da.['header_name']
b =3D a[:header_name]
> puts b
By default, table() converts field names to Symbols for super easy =20
access.
Hope that helps.
James Edward Gray II=