Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rdd = clean_headers_rdd.rdd
- .filter(lambda x: x['date'].year == 2016)
- .map(lambda x: (x['user_id'], 1)).reduceByKey(lambda x, y: x + y)
- .map(lambda (x, y): (y, x)).sortByKey(ascending = False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement