Advertisement
estgestg

Untitled

Jun 12th, 2019
2,547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SPARK 0.22 KB | None | 0 0
  1. val df15 = tweets
  2.   .groupBy("handle")
  3.   .sum("retweet_count", "favorite_count")
  4.   .withColumn("favoritos_retweets", $"sum(retweet_count)" + $"sum(favorite_count)")
  5.   .sort(desc("favoritos_retweets"))
  6.  
  7.  
  8. display(df15)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement