julia> f((k,v)) = k => parse(Float64, v)
f (generic function with 1 method)
julia> Dict(Iterators.map(f, pairs(d)))
Dict{String, Float64} with 1 entry:
"a" => 1.0
# slower than the above for repeated use on the REPL, but if you like Generators
julia> Dict(k => parse(Float64, v) for (k,v) in pairs(d))
Dict{String, Float64} with 1 entry:
"a" => 1.0
keys(mydict) returns a KeySet, which is unordered because the Dict in Base is an unordered dict. If you require an ordered dict, check out DataStructures.jl, but in the majority of use cases you won’t need an ordered one.