How can i to get the first element from the probability model results in a pyspark dataframe?
+------+--------------------+
|labelh| probability|
+------+--------------------+
| 1|[0.72498853530094...|
| 1|[0.99989771872286...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
| 1|[0.72498853530094...|
+------+--------------------+
The probability column has two elements and is type "vector" variable. I need the first element from this column and paste it in the dataframe.
Thanks for help.