Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20938#discussion_r178242821
  
    --- Diff: python/pyspark/sql/functions.py ---
    @@ -2085,6 +2085,23 @@ def sort_array(col, asc=True):
         return Column(sc._jvm.functions.sort_array(_to_java_column(col), asc))
     
     
    +@since(2.4)
    +def flatten(col):
    +    """
    +    Collection function: creates a single array from an array of arrays.
    +    If a structure of nested arrays is deeper than two levels,
    +    only one level of nesting is removed.
    +
    +    :param col: name of column or expression
    +
    +    >>> df = spark.createDataFrame([([[1, 2, 3], [4, 5], [6]],),([None, 
[4, 5]],)], ['data'])
    --- End diff --
    
    Quick note: `,),(` -> `,), (`


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to