How to make dataframe from output of loop

data i have

a = (0:1:160)
conc = (for i in a 
              println(1.05*exp(-0.0228*i))
end

i want to get dataframe with “a” and “conc” columns

1 Like

please at least read the “getting started” part of the documentation:

julia> a = 0:160;

julia> conc = 1.05*exp.(-0.0228 .* a);

julia> df = DataFrame(; a, conc)
161×2 DataFrame
 Row │ a      conc
     │ Int64  Float64
─────┼──────────────────
   1 │     0  1.05
   2 │     1  1.02633
...
3 Likes