I have a map call that results in a row of computed values, therefore I have an Array of rows that are Array of Any, like this
12-element Array{Array{Any,1},1}:
Any[2015-09-01T00:00:00, 2016-09-01T00:00:00, 98, 53.1]
Any[2015-10-01T00:00:00, 2016-10-01T00:00:00, 92, 58.7]
Any[2015-11-01T00:00:00, 2016-11-01T00:00:00, 130, 64.6]
Any[2015-12-01T00:00:00, 2016-12-01T00:00:00, 135, 67.4]
Any[2016-01-01T00:00:00, 2017-01-01T00:00:00, 206, 59.2]
Any[2016-02-01T00:00:00, 2017-02-01T00:00:00, 246, 54.1]
Any[2016-03-01T00:00:00, 2017-03-01T00:00:00, 254, 53.9]
Any[2016-04-01T00:00:00, 2017-04-01T00:00:00, 268, 65.7]
Any[2016-05-01T00:00:00, 2017-05-01T00:00:00, 265, 61.5]
Any[2016-06-01T00:00:00, 2017-06-01T00:00:00, 303, 52.8]
Any[2016-07-01T00:00:00, 2017-07-01T00:00:00, 301, 59.1]
Any[2016-08-01T00:00:00, 2017-08-01T00:00:00, 273, 54.6]
Is there an easy way of turning this into a DataFrame, with column names and so on? If there isn't an easy way, I'm open to harder ways :) I can think of having to re-run map four times to extract the columns and build the DataFrame from those, but that sounds like a lot of code for such a seemingly mundane operation…
EDIT I can "transpose" rows to columns like this
map(x -> map(y -> y[x], r), collect(1:4)
where r is the table above, so I suppose a solution would be to provide column names to the DataFrame constructor. My temporary solution is therefore
DataFrame(map(x -> map(y -> y[x], r), collect(1:4)), [:a, :b, :c, :d])
collect) is pretty good. If generic column names are ok thenDataFrame(hcat(r...)')works too