July 2018
Intermediate to advanced
334 pages
8h 20m
English
Let's the show method, as follows:
println("The Customer-Weapons System dataframe as tuple pairs looks like: ")customerWeaponsSystemPairDf.show
Here is a screenshot of the new customer-weapons-system dataframe as tuple pairs:

Next, we will convert the preceding dataframe into an RDD:
val customerWeaponsSystemPairRDD: RDD[(Int, Int)] = customerWeaponsSystemDf.rdd.map(row => (row.getInt(0), row.getInt(1)) )/*Notes: As far as the algorithm is concerned, customer corresponds to "user" and "product" or item corresponds to a "weapons ...Read now
Unlock full access