Python code to pyspark

pyspark

#1

I have to convert python code to pyspark.while converting I need to apply a class method on pyspark data frame.so that it kind of sends row by row data into class method,but the class method already has another input paramater.i tried in many ways with .map method, but the results are not showing at all, could some one here help me