i'm trying to do this:

using DataFrames
df = DataFrame(a=["hi","there"],x = rand(2))
df2 = DataFrame(a=["oh","yeah"],x = rand(2))

for e in eachrow(df)
append!(df2,e)
end

ERROR: `append!` has no method matching append!(::DataFrame, 
::DataFrameRow{DataFrame}) 
in anonymous at no file:2

or 

julia> for i in 1:nrow(df) 
push!(df2,df[i,:]) 
end

but that errors as well. 

this works:

julia> for i in 1:nrow(df) 
push!(df2,array(df[i,:])) 
end

but wondering whether that's the best way of achieving this efficiently. 

Reply via email to