maxframe.liteframe.LiteFrame.duplicated#

LiteFrame.duplicated(subset=None, keep='first', method='auto')#

Return boolean mask marking duplicate rows.

Parameters:
  • subset (str or list of str, optional) – Only consider certain columns for identifying duplicates, by default use all columns.

  • keep ({"first", "last", False}, default "first") –

    • first: mark duplicates as True except for the first occurrence.

    • last: mark duplicates as True except for the last occurrence.

    • False: mark all duplicates as True.

  • method ({"auto", "tree", "subset_tree", "shuffle"}, default "auto") – Tiling strategy for multi-chunk inputs.

Returns:

A one-column boolean LiteFrame with the same row count as the input.

Return type:

LiteFrame

See also

drop_duplicates

Return LiteFrame with duplicate rows removed.

Examples

>>> import maxframe.liteframe as mlf
>>> lf = mlf.LiteFrame({'a': [1, 1, 2], 'b': [4, 4, 6]})
>>> result = lf.duplicated()
>>> result.execute()
       0
0  False
1   True
2  False