【发布时间】:2019-08-01 13:10:34
【问题描述】:
In Column 由值组成
C1 C2
1 1235
1 4578
1 4177
2 1427
2 1427
2 1427
2 [{"label":"2 Bed, 1 Bathroom"Woodland Tow]
在火花中,如果我使用下面的代码
DataFrame df1=df.groupBy("C1").agg(functions.max("C2");
输出给出
C1 C2
1 4578
2 [{"label":"2 Bed, 1 Bathroom"Woodland Tow]
但我需要
C1 C2
1 4578
2 1427
【问题讨论】:
标签: java apache-spark dataframe apache-spark-sql