Re: Re: How to read mixed-type data from external files?
- To: mathgroup at smc.vnet.net
- Subject: [mg37805] Re: [mg37733] Re: How to read mixed-type data from external files?
- From: Dale Horton <daleh at wolfram.com>
- Date: Wed, 13 Nov 2002 01:12:52 -0500 (EST)
- References: <aqdjo0$si$1@smc.vnet.net> <aqfo6s$71d$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
CSV was added in 4.1. In 4.0, most of the time Table format will do the trick. Import["data.csv", "Table", ConversionOptions -> {"TableSeparators" -> {{"\n", "\r"}, {","}}}] -Dale At 04:38 AM 11/10/2002, Wen-Feng Hsiao wrote: >Thanks for all your helps. > >I am using Mathematica 4.0. It might not support Import function, >since the expression you proposed to me cannot work. > >In[2]:= >Import["data.csv"] > >Import::guess: Could not guess format from channel data.csv. > >Out[2]= >Import["data.csv"] > >In[3]:= >Import["data.csv", "CSV"] > >Import::format: "CSV" is not a recognized Import format. > >Out[3]= >Import["data.csv", "CSV"] > >Fortunately, Sseziwa's method works fine to me. > >{ToExpression[#[[1]]],#[[2]],Sequence@@Table[ToExpression[#[[i]]],{i,3,8 >}]}&/ >@ReadList[strm,Word,WordSeparators\[Rule]{","},RecordLists\[Rule]True] > > >Wen-Feng Hsiao > >---------- >Jens-Peer Kuska <kuska at informatik.uni-leipzig.de> wrote in message >news:<aqfo6s$71d$1 at smc.vnet.net>... > > Hi, > > > > Import["data.css", "CSV"] > > > > ?? > > > > Regards > > Jens > >