I have a dataframe in the following structure:
root
|-- index: long (nullable = true)
|-- text: string (nullable = true)
|-- topicDistribution: struct (nullable = true)
| |-- type: long (nullable = true)
| |-- values: array (nullable = true)
| | |-- element: double (containsNull = true)
|-- wiki_index: string (nullable = true)
I need to change it to:
root
|-- index: long (nullable = true)
|-- text: string (nullable = true)
|-- topicDistribution: array (nullable = true)
| |-- element: double (containsNull = true)
|-- wiki_index: string (nullable = true)
May I ask how can I do that?
Thanks a lot.
topicDistribution
column remains of typestruct
and notarray
and I have not yet figured out how to convert between these two types. – Ingulf