Create a dictionary from Dictionary and Array

I’m not sure how the DataFrames you posted twice now relate to the original question.

Your original question was how can I go from

julia> d = Dict("c" => [1,3,4,6], "b" => [2, 5])
Dict{String, Vector{Int64}} with 2 entries:
  "c" => [1, 3, 4, 6]
  "b" => [2, 5]

to a Dict which has values

julia> d = Dict("c" => [1,3,4,6], "b" => [2, 5])
Dict{String, Vector{Int64}} with 2 entries:
  "c" => [1, 3, 4, 6]
  "b" => [2, 5]

the answer to this question is

julia> d["c"] .= 8; d["b"] .= 9; 

julia> d
Dict{String, Vector{Int64}} with 2 entries:
  "c" => [8, 8, 8, 8]
  "b" => [9, 9]

Here I am overwriting the existing arrays stored in the dictionary with the numbers provided. If you don’t want to hardcode those numbers, you have to pick them out from the DataFrame, doing something like

julia> d = Dict("c" => [1,3,4,6], "b" => [2, 5])
Dict{String, Vector{Int64}} with 2 entries:
  "c" => [1, 3, 4, 6]
  "b" => [2, 5]

julia> for k ∈ keys(d)
           d[k] .= df2[df2.Column1 .== k, :Column2]
       end

julia> d
Dict{String, Vector{Int64}} with 2 entries:
  "c" => [8, 8, 8, 8]
  "b" => [9, 9]