datatable.intersect()

Find the intersection of sets of values in the frames.

Each frame should have only a single column or be empty. The values in each frame will be treated as a set, and this function will perform the intersection operation on these sets, returning those values that are present in each of the provided frames.

Parameters

*frames
Frame | Frame | ...

Input single-column frames.

return
Frame

A single-column frame. The column stype is the smallest common stype of columns in the frames.

except
ValueError | NotImplementedError

dt.exceptions.ValueError

raised when one of the input frames has more than one column.

dt.exceptions.NotImplementedError

raised when one of the columns has stype obj64.

See Also

  • 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.

  • unique() – find unique values in a frame.