#Transformation
unionByName is a method in Apache Spark that is used to perform a union of two DataFrames by matching columns by their names instead of their positions. This is particularly useful when the schemas of the DataFrames being combined have the same column names but are in a different order, or if some columns are missing in one DataFrame but not in the other.

Syntax: -

DataFrame.unionByName(other, allowMissingColumns=False)