加入pyspark不同的列

时间:2019-03-22 11:31:23

标签: pyspark

如何在两个不同的列上加入pyspark数据框?

Cols df1: ID,DATE
cols df2: user,DATE

I want to Join df1.ID==df2.user and df1.DATE==df2.DATE

1 个答案:

答案 0 :(得分:0)

Joindf = df1.join(df2.withColumnRenamed("ID","user"), ["ID","DATE"]) 

应该为你做。