Skip to content

Commit

Permalink
Changed format_string doc string to have accurate parameters and para…
Browse files Browse the repository at this point in the history
…meter descriptions
  • Loading branch information
darrentirto committed Aug 19, 2019
1 parent 5f6eb5d commit 3851cef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/pyspark/sql/functions.py
Expand Up @@ -1569,8 +1569,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()
Expand Down

0 comments on commit 3851cef

Please sign in to comment.