x[int(fno) - 5] = val[1]
return x
tgbr = tfile.map(lambda d: ((d[0][0], d[0][2]), [(d[0][1], d[1])])
    ).reduceByKey(lambda p, q: p + q).map(lambda d: (d[0], map_group(d)))
How to group by multiple keys in spark?