I'm new in Julia.
Using package DataFrames I created an empty dataframe.
using DataFrames
dt = DataFrame(x=Real[], y=Real[], w=Real[], z=Real[])
0×4 DataFrame
Row │ x y w z
│ Real Real Real Real
─────┴─────────────────────────
Now I want to fill this dataframe with zeros and then change the values via a "for". So, I tried
n = 10000
for i in 1:n
push!(dt[i,:], [0])
end
but I get
ERROR: BoundsError: attempt to access 0×4 DataFrame at index [1, :]
How can I fill the dataframe with zeros?
Thanks in advance