I have the following two dataframes .
dataframe1
┌────────────┬─────────────┬──────────────┐
│idZones │Longitude │latitude |
├────────────┼─────────────┼──────────────┤
|[50,30,10] |-7.073781666 |33.826661 |
└────────────┴─────────────┴──────────────┘
dataframe2
┌────────────┬─────────────┬──────────────┐
│id │col1 │col2 │
├────────────┼─────────────┼──────────────┤
│10 │aaaaaaaaaaaa │bb32 │
│90 │ppp │cc20 │
└────────────┴─────────────┴──────────────┘
I want the following output
┌────────────┬─────────────┬──────────────┐
│id │col1 |col2 │
├────────────┼─────────────┼──────────────┤
│10 │aaaaaaaaaaaa │bb32 │
└────────────┴─────────────┴──────────────┘
I use the following code
dataframe1.join(dataframe2,dataframe2.col("id").isin(dataframe1.col("idZones")));
Note the idZones column is an array[int]
I get this error
cannot resolve '(`id` IN (dataframe1.`idZones`))' due to data type mismatch: Arguments must be same type but were: int != array<int>;;
I need your help
Thank you