1

我有一个看起来像这样的 Pyspark 数据框

>>> df1.show(1,False)
+---------------------------+
|col1                       |
+---------------------------+
|[this, is, a, sample, text]| => Not a fixed array elements
+---------------------------+

还有一个像这样的查找表/df

>>> lookup.show()
+------+
|lookup|
+------+
|  this|
|    is|
|     a|
|sample|
+------+

对于每一行,df1我需要在数据框中查找每个数组元素lookup并返回 true 或 false[T,T,T,T,F]

我怎样才能循环通过df1

4

0 回答 0