determine duplicate elements in a DataSeries
AreDuplicate( data )
The AreDuplicate command returns a DataSeries of type truefalseFAIL where the elements correspond to true if the given element has duplicates in the DataSeries and false if the element is unique.
The output from the AreDuplicate command can be used to index a DataSeries or DataFrame in order to return the duplicate elements in a given column.
The AreDuplicate command returns a truefalseFAIL DataSeries that shows any duplicate values as true.
If the DataSeries is indexed by the result, a filtered DataSeries is returned that shows just the duplicate values:
If a DataFrame is indexed by the result, a filtered DataFrame is returned that shows only the rows with duplicates in a given column.
For example, the following shows just the rows with duplicate elements in the first column:
This can also be combined with other queries in order to show rows that meet a given criteria. For example, to see which rows have duplicate elements in the first column and are greater than 2:
DF[ AreDuplicate( DF ) and DF >~ 2 ];
The DataSeries/AreDuplicate command was introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
Download Help Document
What kind of issue would you like to report? (Optional)