This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 30be8d0098d [SPARK-39032][PYTHON][DOCS] Examples' tag for 
pyspark.sql.functions.when()
30be8d0098d is described below

commit 30be8d0098d037e65d798999d80efd4bc8195b82
Author: vadim <86705+va...@users.noreply.github.com>
AuthorDate: Wed Apr 27 16:56:18 2022 +0900

    [SPARK-39032][PYTHON][DOCS] Examples' tag for pyspark.sql.functions.when()
    
    ### What changes were proposed in this pull request?
    Fix missing keyword for `pyspark.sql.functions.when()` documentation.
    
    ### Why are the changes needed?
    
[Documentation](https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.sql.functions.when.html)
 is not formatted correctly
    
    ### Does this PR introduce _any_ user-facing change?
    No.
    
    ### How was this patch tested?
    All tests passed.
    
    Closes #36369 from vadim/SPARK-39032.
    
    Authored-by: vadim <86705+va...@users.noreply.github.com>
    Signed-off-by: Hyukjin Kwon <gurwls...@apache.org>
    (cherry picked from commit 5b53bdfa83061c160652e07b999f996fc8bd2ece)
    Signed-off-by: Hyukjin Kwon <gurwls...@apache.org>
---
 python/pyspark/sql/functions.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py
index 88b7c4dfb64..ec21bbe5ce2 100644
--- a/python/pyspark/sql/functions.py
+++ b/python/pyspark/sql/functions.py
@@ -1404,6 +1404,8 @@ def when(condition, value):
     value :
         a literal value, or a :class:`~pyspark.sql.Column` expression.
 
+    Examples
+    --------
     >>> df.select(when(df['age'] == 2, 3).otherwise(4).alias("age")).collect()
     [Row(age=3), Row(age=4)]
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to