MathGroup Archive 2002

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

Search the Archive

Re: How to read mixed-type data from external files?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37657] Re: How to read mixed-type data from external files?
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 8 Nov 2002 02:13:46 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <aqdjo0$si$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

Import["data.css", "CSV"]

??

Regards
  Jens

Wen-Feng Hsiao wrote:
> 
> Hello,
> 
> Suppose the type of the second column is String, the others are numbers.
> 
> In[1]:=!! data.csv
> 1,WEIGHT,97.5,1123,371,50,25,0.1,2.2046223
> 2,STATURE,797.5,1944,1385,50,25,0.1,0.3937008
> 3,VERTICAL GRIP RCH,957.5,2332,1674,50,30,0.1,0.3937008
> 4,FRONTAL GRIP REACH,337.5,831,580,20,10,0.1,0.3937008
> 5,LATERAL GRIP REACH,462.5,1108,773,25,15,0.1,0.3937008
> 6,STEP HEIGHT,207.5,942,572,25,15,0.1,0.3937008
> 7,SUPINE STATURE,897.5,1925,1441,50,25,0.1,0.3937008
> 8,STANDING CG F FEET,507.5,1075,810,20,15,0.1,0.3937008
> ...
> 
> I tried the following code, but in vain. Could someone help me this out?
> 
> snum = OpenRead["data.csv"]
> data = ReadList[
>     snum, {Number, String, Number, Number, Number, Number, Number, Number,
>       Number}]
> Close[snum]
> 
> Thanks a lot!
> 
> Wen-Feng Hsiao


  • Prev by Date: Finding height/width of a graphic, while creating it?
  • Next by Date: Comments are KILLING me
  • Previous by thread: Re: How to read mixed-type data from external files?
  • Next by thread: RE: How to read mixed-type data from external files?