In DataFrames 0.10, we could use
vcat() as a way to append differently-shaped
DataFrames, much like R’s
dplyr::bind_rows(). You could send two
DataFrames with differing columns or column order and it would append the rows to the right place. This is prior behavior is described by a stackoverflow question and this issue.
Having recently upgraded to DataFrames 0.11, I’m porting code and noticed that this
vcat behavior is no longer true. MWE:
julia> d1 = DataFrame(a = 1, b = 2); d2 = DataFrame(b = 3, a = 4); vcat(d1, d2) ERROR: ArgumentError: column order of argument(s) 1 != column order of argument(s) 2 julia> d1 = DataFrame(a = 1, b = 2); d2 = DataFrame(b = 3, d = 4); vcat(d1, d2) ERROR: ArgumentError: column(s) d are missing from argument(s) 1, and column(s) a are missing from argument(s) 2
It looks intentional in the code. What is the proper use case now?
Edit: I’m using
Dataframes 11.5 and on that tag, you can see that the team is actually testing against the above errors in test/cat.jl , but they are no longer testing against it in master.
So… this implies that it will be fixed soon and someone changed their mind? I can’t find any issues describing this thought process.