pyspark.sql.functions.row_number

pyspark.sql.functions.row_number() → pyspark.sql.column.Column[source]

Window function: returns a sequential number starting at 1 within a window partition.

New in version 1.6.