we need the -bcfmfe pjou classwhich is data type required by the %fdjtjpo sff classand the %fdjtjpo sff class itselfimported from nmmjcusff nextpretty much every spark script you see is going to include this linewhere we import qbsl$pog and qbsl$poufyugspnqztqbsljnqpsu qbsl$pog qbsl$poufyu this is needed to create the qbsl$poufyu object that is kind of the root of everything you do in spark and finallywe're going to import the array library from ovnqzgspnovnqzjnqpsubssbz yesyou can still use /vn zand tdjljumfbsoand whatever you want within spark scripts you just have to make surefirst of allthat these libraries are installed on every machine that you intend to run it on if you're running on clusteryou need to make sure that those python libraries are already in place somehowand you also need to understand that spark will not make the scikitlearn methodsfor examplemagically scalable you can still call these functions in the context of given map functionor something like thatbut it' only going to run on that one machine within that one process don' lean on that stuff too heavilybutfor simple things like managing arraysit' totally an okay thing to do creating the sparkcontext nowwe'll start by setting up our qbsl$poufyuand giving it qbsl$poga configuration dpog qbsl$pog tfu btufs mpdbmtfu"qq/bnf  qbsl%fdjtjpo sffthis configuration object saysi' going to set the master node to "mpdbm"and this means that ' just running on my own local desktopi' not actually running on cluster at alland ' just going to run in one process ' also going to give it an app name of " qbsl%fdjtjpo sff,and you can call that whatever you wantfredbobtimwhatever floats your boat it' just what this job will appear as if you were to look at it in the spark console later on