diff options
author | Reynold Xin <rxin@databricks.com> | 2015-03-31 18:31:36 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-03-31 18:31:36 -0700 |
commit | 305abe1e57450f49e3ec4dffb073c5adf17cadef (patch) | |
tree | 5f2ec2ab473b3fec700bd0fe0db759ebbb72b5d8 /python/pyspark/sql/functions.py | |
parent | 37326079d818fdb140415a65653767d997613dac (diff) | |
download | spark-305abe1e57450f49e3ec4dffb073c5adf17cadef.tar.gz spark-305abe1e57450f49e3ec4dffb073c5adf17cadef.tar.bz2 spark-305abe1e57450f49e3ec4dffb073c5adf17cadef.zip |
[Doc] Improve Python DataFrame documentation
Author: Reynold Xin <rxin@databricks.com>
Closes #5287 from rxin/pyspark-df-doc-cleanup-context and squashes the following commits:
1841b60 [Reynold Xin] Lint.
f2007f1 [Reynold Xin] functions and types.
bc3b72b [Reynold Xin] More improvements to DataFrame Python doc.
ac1d4c0 [Reynold Xin] Bug fix.
b163365 [Reynold Xin] Python fix. Added Experimental flag to DataFrameNaFunctions.
608422d [Reynold Xin] [Doc] Cleanup context.py Python docs.
Diffstat (limited to 'python/pyspark/sql/functions.py')
-rw-r--r-- | python/pyspark/sql/functions.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py index 5873f09ae3..8a478fddf0 100644 --- a/python/pyspark/sql/functions.py +++ b/python/pyspark/sql/functions.py @@ -76,7 +76,7 @@ __all__.sort() def countDistinct(col, *cols): - """ Return a new Column for distinct count of `col` or `cols` + """Returns a new :class:`Column` for distinct count of ``col`` or ``cols``. >>> df.agg(countDistinct(df.age, df.name).alias('c')).collect() [Row(c=2)] @@ -91,7 +91,7 @@ def countDistinct(col, *cols): def approxCountDistinct(col, rsd=None): - """ Return a new Column for approximate distinct count of `col` + """Returns a new :class:`Column` for approximate distinct count of ``col``. >>> df.agg(approxCountDistinct(df.age).alias('c')).collect() [Row(c=2)] @@ -142,7 +142,7 @@ class UserDefinedFunction(object): def udf(f, returnType=StringType()): - """Create a user defined function (UDF) + """Creates a :class:`Column` expression representing a user defined function (UDF). >>> from pyspark.sql.types import IntegerType >>> slen = udf(lambda s: len(s), IntegerType()) |