I also add one alternative:
mapslices(x->[x], input,2)
Edit:
Warning! Now I see that it mapslices
returns a 3x1 matrix! (you can change it: mapslices(x->[x], input,2)[:,1]
)
. - , . (, , !).
, mapslices
. BTW Base.vect
, x->[x]
.
, . - DataFrames
julia> using DataFrames
julia> DataFrame(transpose(input)).columns
3-element Array{Any,1}:
[1, 2, 3]
[4, 5, 6]
[7, 8, 9]
- ,
DataFrame.rows
- : Array { , 1}
- ,
, !:)