0

Let's say we have two dataset:

Dataset 1:

id  name    
1   James
2   Tom

Dataset 2:

id   name
1    Bond
2    Jerry

I want dataset 3 in the following format

Dataset 3:

id   name
1    James
2    Tom
3    Bond
4    Jerry

Thanks in advance!!

thegooner
  • 150
  • 2
  • 10
Myat Noe
  • 5
  • 2
  • 2
    Possible duplicate of [Concatenate two PySpark dataframes](https://stackoverflow.com/questions/37332434/concatenate-two-pyspark-dataframes) – razdi Oct 25 '19 at 03:03

1 Answers1

0

Fairly straightforward,

df3 = df1.union(df2)

Bala
  • 11,068
  • 19
  • 67
  • 120
thegooner
  • 150
  • 2
  • 10