I have a DataArray{UTF8String, 1} and I am trying to map it to an
Array{Int64, 1} using a Dict lookup. My Dict is of type Dict{String,
Int64}, and I'm using map to do the lookup.
However, it seems that the map returns a DataArray{Any, 1} instead of an
Array{Int64, 1}, and I don't understand why this is the case. This is my
code:
typeof(dimensionindexmap)
Dict{Symbol,Dict{String,Int64}} (constructor with 3 methods)
typeof(dimensionindexmap[:geo_cc])
Dict{String,Int64} (constructor with 3 methods)
typeof(results[:geo_cc])
DataArray{UTF8String,1} (constructor with 1 method)
a = results[!isna(results[:geo_cc]), :geo_cc]
y = map(x -> get(dimensionindexmap[:geo_cc], x, 1), a)
println(typeof(y))
DataArray{Any,1}