You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2022/08/02 03:24:13 UTC

[spark] branch master updated: [SPARK-39877][PYTHON][FOLLOW-UP] Add DataFrame melt to PySpark docs

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

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


The following commit(s) were added to refs/heads/master by this push:
     new b0c831d3408 [SPARK-39877][PYTHON][FOLLOW-UP] Add DataFrame melt to PySpark docs
b0c831d3408 is described below

commit b0c831d3408dddfbbf3acacbe8100a9e08b400de
Author: Enrico Minack <gi...@enrico.minack.dev>
AuthorDate: Tue Aug 2 12:24:02 2022 +0900

    [SPARK-39877][PYTHON][FOLLOW-UP] Add DataFrame melt to PySpark docs
    
    ### What changes were proposed in this pull request?
    Same as #37354, but DataFrame.melt is missing from documentation.
    
    Also removes erroneous alias from DataFrame.unpivot doc.
    
    ### Why are the changes needed?
    Documenting new method.
    
    ### Does this PR introduce _any_ user-facing change?
    Only documentation.
    
    ### How was this patch tested?
    No.
    
    Closes #37356 from EnricoMi/branch-pyspark-unpivot-docs-2.
    
    Authored-by: Enrico Minack <gi...@enrico.minack.dev>
    Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
 python/docs/source/reference/pyspark.sql/dataframe.rst | 1 +
 python/pyspark/sql/dataframe.py                        | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/python/docs/source/reference/pyspark.sql/dataframe.rst b/python/docs/source/reference/pyspark.sql/dataframe.rst
index 41a325a1198..fdb79f72fc7 100644
--- a/python/docs/source/reference/pyspark.sql/dataframe.rst
+++ b/python/docs/source/reference/pyspark.sql/dataframe.rst
@@ -73,6 +73,7 @@ DataFrame
     DataFrame.localCheckpoint
     DataFrame.mapInPandas
     DataFrame.mapInArrow
+    DataFrame.melt
     DataFrame.na
     DataFrame.observe
     DataFrame.orderBy
diff --git a/python/pyspark/sql/dataframe.py b/python/pyspark/sql/dataframe.py
index 8c9632fe766..41ac701a332 100644
--- a/python/pyspark/sql/dataframe.py
+++ b/python/pyspark/sql/dataframe.py
@@ -2263,8 +2263,6 @@ class DataFrame(PandasMapOpsMixin, PandasConversionMixin):
         `IntegerType` and `LongType` are cast to `LongType`, while `IntegerType` and `StringType`
         do not have a common data type and `unpivot` fails.
 
-        :func:`groupby` is an alias for :func:`groupBy`.
-
         .. versionadded:: 3.4.0
 
         Parameters
@@ -2309,6 +2307,10 @@ class DataFrame(PandasMapOpsMixin, PandasConversionMixin):
         |  2|   int|12.0|
         |  2|double| 1.2|
         +---+------+----+
+
+        See Also
+        --------
+        DataFrame.melt
         """
 
         def to_jcols(


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