Я пытаюсь сгруппировать все «documentTitle» на основе столбца «code». «Код» представляет собой массив строк. Я сталкивался с подобным вопросом , но решение, похоже, не работает. Вот схема данных
![enter image description here](https://i.stack.imgur.com/Yr9qm.png)
sqlContext.sql("""SELECT code,documentTitle FROM psyc2 """).show(10)
Результат запроса
+------------+--------------------+
| code| documentTitle|
+------------+--------------------+
| [3297]|Discussions on ph...|
| [3410]|Reflecting on lea...|
| [3410]|Changing educatio...|
|[2227, 3410]|Assessment of med...|
| [3410]|Training the trai...|
|[2224, 3371]|Improving the qua...|
| [3410]|The effectiveness...|
| [3410]|The impact of mul...|
|[3410, 4100]|Computer-aided le...|
| [3410]|Setting and maint...|
+------------+--------------------+
Как выбрать строку из столбца кода с типом массива.