« first day (3054 days earlier)      last day (43 days later) » 

2:42 AM
I have a Dataset with named rows and named columns (i.e. containing an Association with Association values). I need to convert row names (keys) into an additional column named "Key", and get a Dataset with unnamed rows and named columns. What's the simplest way to do it? Now I do Normal[Normal[dataset]] and manipulate it.
 
2:52 AM
@VladimirReshetnikov A quick google search finds ir.lib.uwo.ca/cgi/viewcontent.cgi?article=1816&context=etd and a host of other papers on kernel density estimation with restrictions such requiring unimodality (assuming that's a word).
 
@JimB Thanks!
 
I think I figured how to do that with datasets: KeyValueMap[Prepend[#2, "Key" -> #1] &, dataset]
or dataset[KeyValueMap[Prepend[#2, "Key" -> #1] &]]
 
 
4 hours later…
6:59 AM
@VladimirReshetnikov An alternative way of writing essentially the same thing is dataset[KeyValueMap[<|"Key" -> #, #2|>&]] - the main difference is that the order of the association entries "correct" in the sense that the new key is visually in front of the rest (You could of course also achieve that with Prepend["Key" -> #]@#2&)
 
 
13 hours later…
8:25 PM
This time SW ends up talking of gauge symmetries in relation to gluon-gluon interactions...
 

« first day (3054 days earlier)      last day (43 days later) »