📜  Pyspark 中的排名 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:01.744000             🧑  作者: Mango

代码示例1
from pyspark.sql.functions import *
from pyspark.sql.window import Window

ranked =  df.withColumn(
  "rank", dense_rank().over(Window.partitionBy("A").orderBy(desc("C"))))