I am trying create a Dictionary from array
data = ["COMB1" 1.4;
"COMB2" 1.2;
"COMB2" 1.6;
"COMB3" 1.2;
"COMB3" 1.4;
"COMB3" 1.3;
"COMB3" 1.5];
I tried to do that by the following command
dict = Dict( data[i,1] => data[i,2] for i=1:size(data,1))
the output is:
Dict String → Float64 with 3 entries
"COMB1" → 1.40
"COMB2" → 1.60
"COMB3" → 1.50
I was expecting is something like:
Dict("COMB1" => 1.4,
"COMB2" => [1.2,1.6],
"COMB3" => [1.2,1.4,1.3,1.5]);
Dict String → Any with 3 entries
"COMB1" → 1.40
"COMB2" → Float64[2]
"COMB3" → Float64[4]