Say I have a
DataFrame with columns named
:i, :j, :k that are positive integers, and meant jointly form a unique identifier.
df also contains a column named
:z that can be of any type that is meant to hold the data for indices
:i, :j, :k:
df = DataFrame(rand(1:10, 3, 4)) rename!(df, [:i, :j, :k, :z])
How can I convert that to an array
A such that
A[i, j, k] holds the data in
:z for indices
:i = i,
:j = j,
:k = k?
In principle, I can populate the array
A entry by entry with a for-loop, but thought there should be a more elegant way of doing that.