| Author |
Comment/Response |
leo
|
04/04/12 04:55am
Hi,
when I import an Excel file containing 2 columns of numeric data (to be used for a regression analysis later), each numeric value has a special character (looking like a French accent) attached to it.
I use Import, without options:
data = Import["gdp_inflation.xlsx"]
At first glance data looks fine, except the additional {} perhaps:
{{{6.59, 3.57}, {4.08, 1.68}, ... , {4.94, 2.16}}}
However,
lm = LinearModelFit[data, x, x]
fails, because data doesn't seem to be clean. This can be seen when I assign the Import output to a variable:
a = {{{6.59`, 3.57`}, {4.08`, 1.68`}, ...
I can manually remove the offending character, which works. But there must be a better way, surely. The .xlsx file is attached, just in case you wish to try.
Any ideas? Thanks so much in advance.
And, yes: I am very much a beginner
Attachment: gdp_inflation.xlsx, URL: , |
|