i need one help for the below requirement. this is just for sample data. i have more than 200 columns in each data frame in real time use case. i need to compare two data frames and flag the differences.
df1
id, name, city
1, abc, pune
2, xyz, noida
df2
id, name, city
1, abc, pune
2, xyz, bangalore
3, kk, mumbai
expected dataframe
id, name, city, flag
1, abc, pune, same
2, xyz, bangalore, update
3, kk, mumbai, new
can someone please help me to build the logic in pyspark?
Thanks in advance.