datatable.unique()

Find the unique values in all the columns of the frame.

This function sorts the values in order to find the uniques, so the return values will be ordered. However, this should be considered an implementation detail: in the future datatable may switch to a different algorithm, such as hash-based, which may return the results in a different order.

Parameters

frame
Frame

Input frame.

return
Frame

A single-column frame consisting of unique values found in frame. The column stype is the smallest common stype for all the frame columns.

except
NotImplementedError

The exception is raised when one of the frame columns has stype obj64.

See Also

  • intersect() – calculate the set intersection of values in the frames.

  • setdiff() – calculate the set difference between the frames.

  • symdiff() – calculate the symmetric difference between the sets of values in the frames.

  • union() – calculate the union of values in the frames.