I have 2 dataframes df1 and df2 . I am joining both df1 and df2 based on columns col1
and col2
. However the datatype of col1 is string
in df1
and type of col2 is int
in df2
. When I try to join like below,
val df3 = df1.join(df2,df1("col1") === df2("col2"),inner).select(df2("col2"))
The join does not work and return empty datatype. Will it be possible to get proper output without changing type of col2
in df2