Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Reset the keys of an Association as values
ResourceFunction["KeyReset"][asc] resets keys of an Association to be leading values of each record under asc with a predefined index where appropriate. | |
ResourceFunction["KeyReset"][asc,name] specifies the index with a custom name. | |
ResourceFunction["KeyReset"][name] represents an operator form of ResourceFunction["KeyReset"] that can be applied to an expression. |
Reset keys of an Association:
| In[1]:= |
| Out[1]= |
Reset keys of an Association as values and index them with custom names:
| In[2]:= |
| Out[2]= |
Use the operator form:
| In[3]:= |
| Out[3]= |
KeyReset works as the inverse function of the resource function KeyIndex:
| In[4]:= |
| Out[4]= | ![]() |
| In[5]:= |
| Out[6]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License