MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Import[filename,"CSV"] is so slooooooooow!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45947] Re: [mg45920] Import[filename,"CSV"] is so slooooooooow!
  • From: Yasvir Tesiram <yat at omrf.ouhsc.edu>
  • Date: Fri, 30 Jan 2004 04:16:35 -0500 (EST)
  • References: <200401291036.FAA09853@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

What about using the option RecordSeparators -> {","}

Yas

On Jan 29, 2004, at 4:36 AM, 1.156 wrote:

> Hi.
> I'm getting data in CSV files to analyze.  With the new ver. 4.2 I can
> get these data in nicely using
> data = Import["filename", "CSV"]
>
> but it takes 30 seconds to get in a 100kB file.  And I've got to do 
> some
> much longer files.
>
> On the other hand, if I change all the comma delimiters to spaces, I 
> can
> get the data in using
> inFile = OpenRead["filename"];
> y = ReadList[inFile, Number, RecordLists -> True];
> Close[inFile];
>
> This pulls in the same 100kB file in a second or so.  But, doing this
> comma to space conversion is truly slow (using Word).
>
> So, can someone out there enlighten me with a suggestion on how to
> either speed up Import or get ReadList to handle comma delimiters?
>
> Thanks and Regards, Rob


  • Prev by Date: Re: Problem with graphics
  • Next by Date: Re: Creating New Symbols
  • Previous by thread: Import[filename,"CSV"] is so slooooooooow!
  • Next by thread: Re: Import[filename,"CSV"] is so slooooooooow!