I have a single dimensional Array
output (as shown below) and need to be converted to DataFrame
.
x = rand(4)
4-element Array{Float64,1}:
0.951252
0.936421
0.773268
0.207913
p = convert(DataFrame, x) // Why this doesn't work ?
This results in:
MethodError: Cannot
convert
an object of type Array{Float64,1} to an object of type DataFrames.DataFrame This may have arisen from a call to the constructor DataFrames.DataFrame(...), since type constructors fall back to convert methods.
Why this doesn't work ?