How to add multiple columns to a dataframe at once

Another method which works is:

setproperty!.(Ref(df), new_col_names, eachrow(t));

and cleaner version of @chris-b1 answer:

insertcols!(df, (new_col_names .=> eachrow(t))...)

Third way:

DataFrames.hcat!(df,DataFrame(t',new_col_names))
2 Likes