I have a dataset with column and row keys:
dsA={<|"keyA" -> <|"key1" -> "a", "key2" -> "b"|>,
"keyB" -> <|"key1" -> "c",
"key2" -> "d"|>|>, <|"keyC" -> <|"key1" -> "a", "key2" -> "b"|>,
"keyB" -> <|"key1" -> "d", "key2" -> "f"|>|>}//Dataset
Because the row keys get in the way of a number of operations (such as joining with other datasets that might have a different number of rows), I want to change the dataset to the following form:
I asked this as an addendum to a different question, but so far no luck. I can create datasets of the values and the keys:
dsValues = dsA[Values]
dsKeys = dsA[Keys]
But I'm not sure how to put the dsKeys
column in front of the dsValues
table.