pyspark.sql.functions.
row_number
Window function: returns a sequential number starting at 1 within a window partition.
previous
pyspark.sql.functions.rank
next
pyspark.sql.functions.asc