Questions tagged [associations]
Questions on the associative data-structure introduced in Mathematica version 10.
608 questions
7 votes
3 answers
431 views
How to prevent Dataset from converting Pi to decimal point?
This might be another known issue in Dataset but not able to find workaround. Dataset converts $\pi$ to decimal point. But keeps $\{\pi\}$ as exact. Is there a way to tell Dataset to keep $\pi$ as ...
2 votes
0 answers
53 views
default key for associations [closed]
Suppose that I have an association like: a=<|1->2,2->3,3->5|>. I want to modify a such that for every key not in {1,2,3}, for example 4, it returns -...
6 votes
2 answers
230 views
How can I force reevaluation of Association values? [duplicate]
After switching from 13.2 to 14.3, I noticed that some behavior of Association has changed: ...
1 vote
0 answers
81 views
Searchable non-atomic Associations
I really like Associations in most regards. But they can be really annoying to work with when you need to search, or act on, their value contents. I understand why ...
6 votes
3 answers
201 views
Associations in replacement rules variable
I have a large number of replacement rules where the right hand side (RHS) is always the same. To avoid repetition, I separated the two sides to add the same RHS to all of them. This is a minimal ...
1 vote
0 answers
149 views
Converting associations [closed]
I have a huge text file that has these associactions in it(one on each line): {12, 14, 24, 25, 29}->{13, 22, 25, 31, 36} I need to convert it to this form: <...
2 votes
1 answer
131 views
Searching a Tree with associations
My goal is to get association <|{"Yes",8}|->"likeCandy> by arriving at leaf "likeCandy", from ...
3 votes
2 answers
288 views
KeyDrop does not work with a Key that is a list
I want to use Counts with this kind of dataset: assoc = Counts[{a, a, a, a, b, b, b, {c}, {c}}] ...