[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Possible to get a row count from Faster::CSV w/out parsing?

Wes Gamble

6/28/2007 9:13:00 PM

All,

I'm using Faster::CSV to process CSV files. It appears that the only
way to get the number of rows in my CSV file is to call one of the
methods which actually reads through all of the data, like read().

Is this correct? It makes sense that it would be this way, just
wondering.

Thanks,
Wes

--
Posted via http://www.ruby-....

1 Answer

James Gray

6/28/2007 9:24:00 PM

0

On Jun 28, 2007, at 4:13 PM, Wes Gamble wrote:

> I'm using Faster::CSV to process CSV files. It appears that the only
> way to get the number of rows in my CSV file is to call one of the
> methods which actually reads through all of the data, like read().
>
> Is this correct? It makes sense that it would be this way, just
> wondering.

That's correct. It's impossible to know a row count without parsing
CSV content since fields can contain embedded line endings.

James Edward Gray II