You are viewing documentation about an older version (1.2.0). View latest version

snowflake.snowpark.DataFrame.unionAll

DataFrame.unionAll(other: DataFrame) DataFrame[source]

Returns a new DataFrame that contains all the rows in the current DataFrame and another DataFrame (other), including any duplicate rows. Both input DataFrames must contain the same number of columns.

Example:

>>> df1 = session.create_dataframe([[1, 2], [3, 4]], schema=["a", "b"])
>>> df2 = session.create_dataframe([[0, 1], [3, 4]], schema=["c", "d"])
>>> df1.union_all(df2).show()
-------------
|"A"  |"B"  |
-------------
|1    |2    |
|3    |4    |
|0    |1    |
|3    |4    |
-------------
Copy
Parameters:

other – the other DataFrame that contains the rows to include.