摘要: val goalsDF = Seq( ("messi", 2), ("messi", 1), ("pele", 3), ("pele", 1) ).toDF("name", "goals") goalsDF.show() + + + | name|goals| + + + |messi| 2| |m 阅读全文
posted @ 2020-12-30 18:12 船长博客 阅读(1411) 评论(0) 推荐(2) 编辑
摘要: val goalsDF = Seq( ("messi", 2), ("messi", 1), ("pele", 3), ("pele", 1) ).toDF("name", "goals") goalsDF.show() + + + | name|goals| + + + |messi| 2| |m 阅读全文
posted @ 2020-12-30 18:03 船长博客 阅读(1023) 评论(0) 推荐(0) 编辑
摘要: import org.apache.spark.sql.functions.{row_number, max, broadcast} import org.apache.spark.sql.expressions.Window val df = sc.parallelize(Seq( (0,"cat 阅读全文
posted @ 2020-12-30 11:32 船长博客 阅读(533) 评论(0) 推荐(0) 编辑
永远相信美好的事情即将发生!