
Ultimate access to all questions.
Identify the error in the following code snippet intended to transform the productCategories column (containing arrays of strings) into individual rows with one word per row, and explain how to fix it:
storesDF.withColumn("productCategories", split(col("productCategories")))
Given this sample of storesDF:
storeId | productCategories
------- | -----------------
0 | [netus, pellentes...]
1 | [consequat enim,...]
2 | [massa, a, vitae,...]
3 | [aliquam, donec...]
4 | [condimentum, fer...]
5 | [viverra habitan...]