pyspark.sql.DataFrame.intersect

DataFrame.intersect(other)[source]

Return a new DataFrame containing rows only in both this DataFrame and another DataFrame.

This is equivalent to INTERSECT in SQL.

New in version 1.3.