Question : spark densevector to list
Answered by : index-out-of-bounds
In your case - at least according to the docs I found
- you should be able to access those values with
DenseVector.values
Source : https://stackoverflow.com/questions/48767109/densevector-to-array-list-pyspark-ml | Last Update : Wed, 30 Sep 20
Question : spark sparsevector to list
Answered by : index-out-of-bounds
list(vector.toArray().tolist())
Source : https://stackoverflow.com/questions/47671546/pyspark-sparsevector-column-to-matrix | Last Update : Wed, 30 Sep 20