Hi,
I try top append a line to 2 similar DataFrames, using the strategy described here before DataFrame recent update :
But I have some problem because I do not manage to use append!() function without eltype error. Since the 2 DataFrames are similar, I expect the columns to have the same eltype.
Thank you for your help !
julia> typeof(x)
DataFrames.DataFrame
julia> y = similar(x,0)
0×6 DataFrames.DataFrame
julia> typeof(y)
DataFrames.DataFrame
julia> append!(y, x[4,:])
ERROR: Column eltypes do not match
Stacktrace:
[1] append!(::DataFrames.DataFrame, ::DataFrames.DataFrame) at /home/fred/.julia/v0.6/DataFrames/src/dataframe/dataframe.jl:778
julia> eltypes(x)
6-element Array{Type,1}:
WeakRefString{UInt8}
CategoricalArrays.CategoricalString{UInt32}
CategoricalArrays.CategoricalString{UInt32}
CategoricalArrays.CategoricalString{UInt32}
CategoricalArrays.CategoricalString{UInt32}
Float64
julia> eltypes(y)
6-element Array{Type,1}:
Union{Missings.Missing, WeakRefString{UInt8}}
Union{CategoricalArrays.CategoricalString{UInt32}, Missings.Missing}
Union{CategoricalArrays.CategoricalString{UInt32}, Missings.Missing}
Union{CategoricalArrays.CategoricalString{UInt32}, Missings.Missing}
Union{CategoricalArrays.CategoricalString{UInt32}, Missings.Missing}
Union{Float64, Missings.Missing}