DataFrame/AreDuplicate - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Statistics and Data Analysis : DataFrames and DataSeries : DataFrame Commands : DataFrame/AreDuplicate

DataFrame/AreDuplicate

determine duplicate rows in a DataFrame

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

AreDuplicate( data )

Parameters

data

-

DataFrame

Description

The AreDuplicate command returns a DataSeries of type truefalseFAIL where the elements correspond to true if the corresponding row has duplicates in the DataSeries and false if the row is unique.

The output from the AreDuplicate command can be used to index a DataFrame in order to return the duplicate rows.

Examples

The following DataFrame has one duplicate row; the fourth row is the same as the first.

DFDataFrame1,1,2,1,3,4|6,5,1,6,9,9|4,2,1,4,8,3

DF123116421523211416453986493

(1)

The AreDuplicate command returns a truefalseFAIL DataSeries that shows duplicate rows as true and unique rows as false.

AreDuplicateDF

1true2false3false4true5false6false

(2)

If the DataFrame is indexed by the result, a filtered DataFrame is returned that shows just the duplicate rows:

DFAreDuplicateDF1

123116421524164

(3)

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 whose entries in the second column are less than 6:

DF[ AreDuplicate( DF[1] ) and DF[2] <~ 6 ];

1232152

(4)

Compatibility

• 

The DataFrame/AreDuplicate command was introduced in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

AreUnique

type/truefalseFAIL