def transformation_function(a_model):
    delim = a_model.delim

def _transformation_function(row):
    return row.split(delim)
return _transformation_function

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

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