Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- r1 = lines.map(lambda x: x.split("\n"))
- r2 = r1.map(lambda x: x[0].split(','))
- r2.take(10)
- r3 = r2.map(lambda x: ( x[2].split('-')[0], x[12]))
- r4 = r3.groupByKey().mapValues(list).collect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement