Having a data frame like this :
| X1 | X2 | X3 |
| ----- | ----- | ----- |
| 11 | 12 | 4 |
| 22 | 16 | 10 |
| 12 | 17 | 75 |
| 42 | 3 | 6 |
.
.
.
How can I transform it to this :
| Attributes | label |
| ------------- | ----- |
| (11,22,12,42) | 0 |
| (12,16,17,3) | 0 |
| (4,10,75,6 ) | 0 |
.
.
.
Each column became a vector...
I know how to do the opposite, which is putting all the values from each row in a vector using the VectorAssemblerbut I don't know how to put all the values from each column in a vector like that.
Any help would be highly appreciated.