pyspark.sql.functions.
format_number
Formats the number X to a format like ‘#,–#,–#.–’, rounded to d decimal places with HALF_EVEN round mode, and returns the result as a string.
New in version 1.5.0.
Column
the column name of the numeric value to be formatted
the N decimal places