I've tended to not put quotes around the names of my Key
when making Associations
. For example:
devToaAssoc = AssociationThread[{Flag, ALOB, LI}, {True, #[[1]], #[[3 ;; 12]]}] & /@ dataIn;
However I've run into problems in trying to do certain things. For example, in the Dataset
section of Help, there is the following example:
dataset[Select[#a < 5 &]]
If I change the example so that the key is a, but without quotes, I can't get a Select
to work. I've tried a number of things, for example, using Key[a]
, and without the &. Also I've noticed that the Dataset
display is quite different if I remove the quotes from the Key
A.
I have 2 questions. First, is there some way I should be able to get that Select
statement to work if my key doesn't have quotes? Second, are there any other issues I should be aware of that might make NOT using quotes a bad idea?
dataset[Select[Key[a] < 5 &]]
$\endgroup$dataset
, it's impossible for me to investigate what went wrong withdataset[Select[Key[a] < 5 &]]
. You need to provide real data if you want more than vague advice. $\endgroup$