Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Import specific columns from a tsv-file

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92180] Re: Import specific columns from a tsv-file
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Mon, 22 Sep 2008 07:08:24 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <gb7ocu$nhp$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

and I have no *.tsv file -- what should I do ?

But to drop the first column you can use
lst = {{a, b, c},
            {1, 2, 3},
            {\[Alpha], \[Beta], \[Chi]}}

Rest  /@ lst

or

Drop[#, 1] & /@ lst

or

Take[#, -Length[#] + 1] & /@ lst

or

Transpose[Rest[Transpose[lst]]]

or

Reverse[Most[Reverse[#]]] & /@ lst

or

lst /. v_?VectorQ :> Rest[v]


Regards
   Jens

suladna wrote:
> Hi 
> 
> I want to import data from a tsv-file to a Table in Mathematica, without the first column of the tsv-file. What should I write to do this? 
> 
> Alternatively I can import the whole tsv-file and then drop the first column from my Mathematica-Table.. but I don't know how to do the "drop column" part. 
> 
> Sul Adna
> 


  • Prev by Date: Re: mathematica 6.0.3 and mac os x 10.5.5 crashes?
  • Next by Date: Re: How to collect terms based the total power of x and y
  • Previous by thread: Import specific columns from a tsv-file
  • Next by thread: Re: Import specific columns from a tsv-file