How to save financial data to a file in math?

I want to save financial data obtained from the following code:

data = FinancialData["GE","OHLCV", "Jan. 1, 2000"];

Format:

{{yy, mm, dd}, {O, H, L, C, V}}

I want 2 columns, one for { date }, the other for { O , H , L , C , V }, but in the second column I want to process each individual value (for example, a list?)

I tried:

Export[dir <> filename <> ".csv", data];
data1 = Import[dir <> filename <> ".csv", "Table"];

And also in other formats, "List", etc.

The problem is that I have a working program for checking data, and it works fine when I get it from FinancialData, but I just can not find a way to export and import, as if I did FinancialData ...

For example, I can’t think:

C = Table[data1[[i]][[2]][[4]], {i, 1, n}];

(, , , data1)

?

+4
2

csv, Mathematica ? ,

data = FinancialData["GE", "OHLCV", "Jan. 1, 2000"];

Export["tmp/test.m", data]
data2 = Import["tmp/test.m"];

,

data2 == data

True

+1

, , -, -

Export["file.csv", Flatten[data,{2}]]

, :

 {#[[;;3]],#[[4;;]]}&/@Import["file.csv"]
0

All Articles