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

    https://github.com/apache/spark/pull/20962#discussion_r179044376
  
    --- Diff: python/pyspark/sql/column.py ---
    @@ -462,9 +488,39 @@ def isin(self, *cols):
         >>> df.select(df.name).orderBy(df.name.desc()).collect()
         [Row(name=u'Tom'), Row(name=u'Alice')]
         """
    +    _desc_nulls_first_doc = """
    +    Returns a sort expression based on the descending order of the given 
column name and null values
    +    return before non-null values
    +
    +    >>> from pyspark.sql import Row
    +    >>> df = spark.createDataFrame([
    +    ...     Row(name=u'Tom', height=80),
    +    ...     Row(name=None, height=None),
    +    ...     Row(name=u'Alice', height=None)
    +    ... ])
    --- End diff --
    
    I think, things like `spark.createDataFrame([('Alice', 1)], ['name', 
'height'])` would be simpler.


---

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

Reply via email to