0

I have two dataframes: df1 looks like below:

A    B    C    D    E    F    G    H
2    6    8    1    3    9    2    3

df2 looks like below:

A    C    D    G
3    2    4    9

Now, I want to add the data of df2 to df1. But, I want to insert "N/A" for df2 when any column which exists in df1 but not present in df2. You can think, my I want something like below:

A    B    C    D    E    F    G    H
2    6    8    1    3    9    2    3
3   N/A   2    4   N/A  N/A   9    N/A

Can anyone please help, how can I do this?

sksoumik
  • 845
  • 1
  • 9
  • 23

0 Answers0