我有这样的数据
TagID,ListnerID,Timestamp,Sum_RSSI
2,101,1496745906,90
3,102,1496745907,70
3,104,1496745906,80
2,101,1496745909,60
4,106,1496745908,60
我的预期输出是
2,101,1496745906,90
3,104,1496745906,80
4,106,1496745908,60
我试过这个
val high_window = Window.partitionBy($"tagShortID")
val prox = averageDF
.withColumn("rank", row_number().over(window.orderBy($"Sum_RSSI".desc)))
.filter($"rank" === 1)
但它会打印所有行。任何帮助将不胜感激。