From 276d2d531f4d2606965d73844ff68c3bf25dd381 Mon Sep 17 00:00:00 2001 From: Cheng Hao Date: Tue, 28 Jul 2015 21:12:09 -0700 Subject: [PATCH] add empty line --- python/pyspark/sql/functions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py index f1416cbf35894..af620335afce8 100644 --- a/python/pyspark/sql/functions.py +++ b/python/pyspark/sql/functions.py @@ -569,8 +569,10 @@ def length(col): def format_number(col, d): """Formats the number X to a format like '#,###,###.##', rounded to d decimal places, and returns the result as a string. + :param col: the column name of the numeric value to be formatted :param d: the N decimal places + >>> sqlContext.createDataFrame([(5,)], ['a']).select(format_number('a', 4).alias('v')).collect() [Row(v=u'5.0000')] """ @@ -907,6 +909,7 @@ def size(col): def sort_array(col, asc=True): """ Collection function: sorts the input array for the given column in ascending order. + :param col: name of column or expression >>> df = sqlContext.createDataFrame([([2, 1, 3],),([1],),([],)], ['data'])