SNICScienceCloud / LDSA-Spark

A collections of Apache Spark notebooks for the LDSA course
Apache License 2.0
0 stars 3 forks source link

Access tuple in array #8

Open NorwayLobster opened 7 years ago

NorwayLobster commented 7 years ago

[(d1,label1),(d2,label2),(d3,label3),…, (distn,labeln)], if i want to pick out label1, label2 and label3, i try .take(3)._1_2, .take(3)._2_2, .take(3)._3_2, but it does not work.

mcapuccini commented 7 years ago

try .take(3)(0)._2, .take(3)(1)._2, .take(3)(2)._2