def transformation_function(row):
    row = row.split(',')
return row[0] + row[1]

def __init__(self):
    self.data = sc.textFile('some.csv')

def run_model(self):
    self.data = self.data.map(model.transformation_function)
How to process RDDs using a Python class?