MathGroup Archive 2010

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

Search the Archive

Re: Excel Data Managing

  • To: mathgroup at
  • Subject: [mg110355] Re: Excel Data Managing
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at>
  • Date: Tue, 15 Jun 2010 02:28:34 -0400 (EDT)
  • References: <hv3nh8$qq$>

Hi Matteo,

First you have to throw away the text headers using Drop or Take.

Are you sure that each data triplet has two sets of curly brackets
around it? It looks unusual, not what I normally get when I import
from Excel. Assuming you put the rest of the dataset in the variable
data I'd suggest getting rid of the extra layer of brackets using

data = Flatten[data, 1]

If you want to plot Price against Year you could use ListPlot or
DateListPlot as follows:

ListPlot[Transpose[{ data[[All,1]], data[[All,2]] } ] .

data[[All,1]] takes the first column of the dataset and data[[All,2]]
takes the second. Putting them in a new list with { } and using
Transpose makes it a list with data pairs.

An alternative approach would be:

ListPlot[Transpose[{ Transpose[data][[1]], Transpose[data][[1]] } ]

Cheers -- Sjoerd

On Jun 14, 12:53 am, Sharing the Jazz <formenti.mat... at>
> Hi,
> I import a dataset of three variable from excel to mathematica. The
> input works but i don't know how to work on it, for example plot it,
> analyze stationarity. The problem is that they are on this form and
> Mathematica (with Time Series application) doesn't work.
> {{{"Year", "Price", "Dividend"}}, {{1871., 77.2276,
>    4.52234}}, {{1872., 83.2615, 4.51085}}, ..... {{2009., 888.75,
> 28.7598}}}
> Can someone help me in start using this data?
> Thank you very much,
> Matteo
> HEC-Paris

  • Prev by Date: Re: Can you tell me what is wrong with this program
  • Next by Date: Re: Can you tell me what is wrong with this program
  • Previous by thread: Re: Excel Data Managing
  • Next by thread: problem with the usage or implemetation of EllipticF[x,m] and