Now I want to add n number of columns to df with labels names names(df_colname), and fill all the cells with zeros (or another initialization value).
What is the best way to do it? I can use the first line I wrote here to create the dataframe with the first column, but I’m not sure how to add the rest of them.
DataFrames are best used to represent data which has several attributes with heterogenous types. It seems that you are going to create some sort of a Matrix with a common type to the data in the columns.
If this is the case, and the names of the rows and columns are important, consider using NamedArrays.jl instead of a DataFrame.