-
Notifications
You must be signed in to change notification settings - Fork 373
Closed
Labels
Milestone
Description
Should we add a function like vcat(df1, df2, df3, source = ["X", "Y", "Z"]) which concatenates DataFrames while also labeling their origins? In this example, the output would be equivalent to doing:
df1_alt = copy(df1)
df1_alt[:source] = "X"
df2_alt = copy(df2)
df2_alt[:source] = "Y"
df3_alt = copy(df3)
df3_alt[:source] = "Z"
vcatted = vcat(df1_alt, df2_alt, df3_alt)
The idea is to preserve the semantics of Base.vcat, but allow the introduction of a custom column (whose name comes from a keyword arg) that denotes the origin of each subset of data.