df:
[Row(split(value,,)=[u'21.0', u'1',u'2']),Row(split(value,,)=[u'22.0', u'3',u'4'])]
how to convert each row in df into a LabeledPoint
object, which consists of a label and features, where the first value is the label and the rest 2 are features in each row.
mycode:
df.map(lambda row:LabeledPoint(row[0],row[1: ]))
It does not seem to work, new to spark hence any suggestions would be helpful.