I'm new to pyspark from pandas.
Joining on one condition and dropping duplicate seemed to work perfectly when I do:
df1.join(df2, df1.col1 == df2.col1, how="left").drop(df2.col1)
However what if I want to join on two columns condition and drop two columns of joined df b.c. it is a duplicate.
I've tried:
df1.join(df2, [df1.col1 == df2.col1, df1.col2 == df2.col2, how="left").drop(df2.col1, df2.col2)