tjohnbq here' little example of how you might use the map function in your worksee tdqbsbmmfmj[ seenbq mbnceby let' say created an rdd just from the list can then call seenbq with lambda function of that takes in each rowthat iseach value of that rddcalls it xand then it applies the function multiplied by to square it if were to then collect the output of this rddit would be and because it would take each individual entry of that rdd and square itand put that into new rdd if you don' remember what lambda functions arewe did talk about it little bit earlier in this bookbut as refresherthe lambda function is just shorthand for defining function in line so seenbq mbnceby is exactly the same thing as separate function efg trvbsf* sfuvsoy yand saying seenbq trvbsf* it' just shorthand for very simple functions that you want to pass in as transformation it eliminates the need to actually declare this as separate named function of its own that' the whole idea of functional programming so you can say you understand functional programming nowby the waybut reallyit' just shorthand notation for defining function inline as part of the parameters to nbq functionor any transformation for that matter actions you can also perform actions on an rddwhen you want to actually get result here are some examples of what you can dodpmmfdu you can call collect(on an rddwhich will give you back plain old python object that you can then iterate through and print out the resultsor save them to fileor whatever you want to do dpvou you can also call dpvou which will force it to actually go count how many entries are in the rdd at this point dpvou# bmvf this function will give you breakdown of how many times each unique value within that rdd occurs ublf you can also sample from the rdd using ublf which will take random number of entries from the rdd