Skip to content

Instantly share code, notes, and snippets.

@NeerajBhadani
Created May 25, 2020 15:08
Show Gist options
  • Save NeerajBhadani/0e9ed8f8cd9c62d83a5bd583531c462c to your computer and use it in GitHub Desktop.
Save NeerajBhadani/0e9ed8f8cd9c62d83a5bd583531c462c to your computer and use it in GitHub Desktop.
row_number
val row_num_df = empsalary.withColumn("row_number", row_number().over(winSpec))
row_num_df.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment