diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py index 37bcaa328cbad..5774f1341ef82 100644 --- a/python/pyspark/sql/functions.py +++ b/python/pyspark/sql/functions.py @@ -1521,8 +1521,9 @@ def format_string(format, *cols): """ Formats the arguments in printf-style and returns the result as a string column. - :param col: the column name of the numeric value to be formatted - :param d: the N decimal places + :param format: string that can contain embedded format tags and used as result column's value + :param cols: list of column names (string) or list of :class:`Column` expressions to + be used in formatting >>> df = spark.createDataFrame([(5, "hello")], ['a', 'b']) >>> df.select(format_string('%d %s', df.a, df.b).alias('v')).collect()