pyspark.sql.DataFrame.unionAll#

DataFrame.unionAll(other)[source]#

Return a new DataFrame containing the union of rows in this and another DataFrame.

New in version 1.3.0.

Changed in version 3.4.0: Supports Spark Connect.

Parameters
otherDataFrame

Another DataFrame that needs to be combined

Returns
DataFrame

A new DataFrame containing combined rows from both dataframes.

See also

DataFrame.union

Notes

This method combines all rows from both DataFrame objects with no automatic deduplication of elements.

Use the distinct() method to perform deduplication of rows.

unionAll() is an alias to union()