Import[filename,"CSV"] is so slooooooooow!
- To: mathgroup at smc.vnet.net
- Subject: [mg45920] Import[filename,"CSV"] is so slooooooooow!
- From: "1.156" <rob at pi-overe.com>
- Date: Thu, 29 Jan 2004 05:36:46 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
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
- Follow-Ups:
- Re: Import[filename,"CSV"] is so slooooooooow!
- From: Tomas Garza <tgarza01@prodigy.net.mx>
- Re: Import[filename,"CSV"] is so slooooooooow!
- From: Yasvir Tesiram <yat@omrf.ouhsc.edu>
- Re: Import[filename,"CSV"] is so slooooooooow!