def go():
    with open('train.csv') as fr:
        lines = [line.replace('true', '1').replace('false', '0').split(',') for
            line in fr]
return zip(*lines[1:])
Spark performance for Scala vs Python