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
>