Wolfram: Create Association
Create by Map Function to a Key List
AssociationMap[f, list]
-
- Creats a association.
- Each item is
elem -> f[elem]
AssociationMap[ff, {3,4,5}] (* <|3 -> ff[3], 4 -> ff[4], 5 -> ff[5]|> *)
Create by Key List and Value List
AssociationThread[ listA -> listB ]
-
return an asso such that keys are elements in listA, values are corresponding elements in listB.
:>
can be used instead of->
to create a delayed rule. 〔see Wolfram: Rule, RuleDelayed〕AssociationThread[ {"a", "b", "c"} -> {3,4,5} ] (* <|a -> 3, b -> 4, c -> 5|> *)
AssociationThread[ {"a", "b", "c"} :> {3,4,5} ] (* <|a :> 3, b :> 4, c :> 5|> *)
Wolfram. Association (Key Value List)
- Wolfram: Association (Key Value List)
- Wolfram: Create Association
- Wolfram: Association. Add Item
- Wolfram: Association. Get Value
- Wolfram: Association. Check Key Exist
- Wolfram: Association. Check Value Exist
- Wolfram: Association. Delete Items by Key
- Wolfram: Association. Delete Items by Index
- Wolfram: Association. Delete Items by Filter
- Wolfram: Association. Sort
- Wolfram: Association. Union, Intersection, Complement, Etc
- Wolfram: Association. Map Function
- Wolfram: Association. Get All Keys or Values
- Wolfram: JSON Import Export