pyspark.sql.functions.
percent_rank
Window function: returns the relative rank (i.e. percentile) of rows within a window partition.
New in version 1.6.