I’m a bit stuck here. I have a pandas data store that looks like this:
Dict{String,Any} with 6 entries:
"axis1" => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9 … 29592, 29593, 29594, 295…
"axis0" => String["run", "event", "moduleID", "pixelID", "time"]
"block0_values" => [30.4698 31.4345 … 42.8309 30.2701]
"block1_items" => String["run", "event", "moduleID", "pixelID"]
"block1_values" => [4118 4118 … 4118 4118; 39248 39248 … 78452 78452; 1 1 … 1…
"block0_items" => String["time"]
What I’ve come up so far is this:
function readDigitsTableFromHDF5_File(fname)
d = h5read(fname, "digits")
names = [(Symbol(i) for i in d["block1_items"])...,collect(Symbol(i) for i in d["block0_items"])...]
data = [(d["block1_values"][i,:] for i in 1:length(d["block1_items"]))...,(d["block0_values"][i,:] for i in 1:length(d["block0_items"]))...]
@NT(names)(data)
end
But this doesn’t work, a map over filenames returns this shape:
Table with 1 rows, 1 columns:
Columns:
# colname type
─────────────────────────────────────
1 names Array{Array{Float64,1},1}
This isn’t what I was hoping for. What is the right syntax to generate the NamedTuple?