DeleteDuplicatesBy

DeleteDuplicatesBy[{e1,e2,},f]

deletes those ei that yield duplicates in the list {f[e1],f[e2],}.

DeleteDuplicatesBy[f]

represents an operator form of DeleteDuplicatesBy that can be applied to an expression.

Details

Examples

Basic Examples  (2)

Delete pairs with a duplicate last element:

In[1]:=
Click for copyable input
Out[1]=

Delete values from an association that have the same magnitude:

In[2]:=
Click for copyable input
Out[2]=

Use the operator form of DeleteDuplicatesBy:

In[1]:=
Click for copyable input
Out[1]=

See Also

DeleteDuplicates  CountDistinct  CountDistinctBy  DuplicateFreeQ  GroupBy  GatherBy

Introduced in 2014
(10.0)