At DataValues.jl, I am informed that " One can access or unpack the value within a DataValue
either via the get(x)
function, or use the x[]
syntax." I do not know “the x[]
syntax” - when I tried just writing (e.g.) i.key[]
, I got a nasty error.
Going to Query.jl,which claims at its bottom “The package is completely documented.”, I looked for DataValue - there is some text about missing values in Getting started, but nothing whatsoever about some []
syntax. Should it be there, or where else would I look?
Last, it might be that I have another sort of (understanding or code) problem. What I do, is:
fromdata = DataFrame(@from i in ... begin ... @select { i.key, i.xmin, ... } end)
...
key2x = Dict(collect(@from i in fromdata begin @select i.key => i.xmin end))
and then later, in a PyPlot diagram,
for (k, x) in pairs(key2x)
annotate(" $k", (key2x[k], minimum(fromdata.min)), size="xx-small", rotation="vertical")
end
I expected the $k
to be the key value - however, I get the key and then appended “:DataValue{String}()”. I assumed that k is thus not a “naked string”, but a string boxed in a DataValue. However, when I replace $k
with $(get(k))
(according to the doc of DataValue), I get an error
MethodError: no method matching get(::String)
So k
is a String - but why, then, does my annotation in the diagram have this type appendix??
Thanks for any clarification!
H.M.