Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Consistently replace sensitive data values with UUIDs
ResourceFunction["PseudonymizeData"][table] replaces strings at level 2 in table with UUIDs such that repeated values are replaced with the same UUID. | |
ResourceFunction["PseudonymizeData"][table,partspec] replaces data in table with UUIDs such that repeated values are replaced with the same UUID at positions specified by partspec. |
Replace strings with UUID pseudonyms:
In[1]:= |
|
Out[1]= |
|
Replace the first column with UUID pseudonyms:
In[2]:= |
|
Out[2]= |
|
You can pseudonymize multiple columns and shared values will share UUIDs across columns:
In[3]:= |
|
Out[3]= |
|
PseudonymizeData can be applied to a Dataset:
In[4]:= |
|
Out[4]= |
|
If the data is a list of associations, you can use the key as an index:
In[5]:= |
|
Out[5]= |
|
If the first row contains headers you can apply pseudonymization from the second row onwards using Span:
In[6]:= |
|
Out[7]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License