I'm trying to Transpose each value list of association. This is actually a dataset problem, but I thought it would be easier to get answers here for associations. I go into more detail about the data set problem under the little break.
I currently have a list of associations which looks like this:
assoc =
{<|"a" -> 5, "b" -> 7, "c" -> 9, "d" -> 8|>,
<|"a" -> 3, "b" -> 12, "c" -> 14, "d" -> 17|>,
<|"a" -> 8, "b" -> 0, "c" -> 5, "d" -> 32|>}
And I want to Transpose each "b","c","d" with each "a": so my output would be:
{{"a" -> 5, "b" -> 7},
{"a" -> 5, "c" -> 9},
{"a" -> 5, "d" -> 8},
{"a" -> 3, "b" -> 12},
{"a" -> 3, "c" -> 1},
{"a" -> 3, "d" -> 17},
{"a" -> 8, "b" -> 0},
{"a" -> 8, "c" -> 5},
{"a" -> 8, "d" -> 32}}
I've tried various methods of mapping and transposing, but I can't find anything that actually works.
I'd love some help with this please!
If you're interested in the root of the problem - I have a data set which is built something like this:
ds={<|"date" -> "01/06", "a" -> 140., "b" -> 868., "c" -> 450.,
"d" -> 593., "e" -> 233., "f" -> 457.,
"g" -> 105.|>,
<|"date" -> "02/06", "a" -> 139., "b" -> 836.,
"c" -> 477., "d" -> 528., "e" -> 268., "f" -> 472.,
"g" -> 119.|>,
<|"date" -> "03/06", "a" -> 117., "b" -> 820.,
"c" -> 409., "d" -> 563., "e" -> 298., "f" -> 461.,
"g" -> 116.|>}
I'm trying to make a DateListPlot with all of the columns as lines, and "date" as the time series. The easiest way to make a DateListPlot seems to be to transpose each column with the date column (in my actual dataset the date column is all date objects):
DateListPlot[Transpose[{Normal[ds[All, "date"]] , Normal[ds[All, "a"]]}]]
But I can't figure out how to do this for each column and then put all the columns into the DateListPlot as separate lines.