Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: selecting columns from a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg47861] Re: [mg47844] selecting columns from a list
  • From: Tomas Garza <tgarza01 at prodigy.net.mx>
  • Date: Thu, 29 Apr 2004 03:05:08 -0400 (EDT)
  • References: <200404281056.GAA12272@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

If you have already read your data into "data", try any of the following:

In[1]:=
Transpose[Drop[Transpose[data], 2]]

In[2]:=
(Take[#, 2 - n] & ) /@ data

(where n is the number of columns in data).

Tomas Garza

Mexico City
----- Original Message ----- 
From: "Edo" <eddoGrasho at edo.com>
To: mathgroup at smc.vnet.net
Subject: [mg47861] [mg47844] selecting columns from a list


> Hello
> I just started with mathematica, wanted to load a comma separated data 
> file and drop the first two columns. So I did
> data=Import["C:\Data\filename.ext","CSV"]; to get the file into a 
> variable "data", then I am stuck, after doing some reading in the help 
> files about Drop, Partition, Take. . etc
> could someone tell me what to read and where to find info about indexing 
> different data structures
> 
> thanks
> 
> 


  • Prev by Date: Re: selecting columns from a list
  • Next by Date: Newbie Newton Algorithm and extra precision digits
  • Previous by thread: Re: selecting columns from a list
  • Next by thread: Re: selecting columns from a list