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

    https://github.com/apache/spark/pull/17827#discussion_r114244380
  
    --- Diff: python/pyspark/sql/column.py ---
    @@ -224,7 +224,39 @@ def __init__(self, jc):
            
https://spark.apache.org/docs/latest/sql-programming-guide.html#nan-semantics
         .. versionadded:: 2.3.0
         """
    +    _isNotDistinctFrom_doc = _eqNullSafe_doc.replace("eqNullSafe", 
"isNotDistinctFrom")
    +    _isDistinctFrom_doc = """
    +    Inequality test that is safe for null values.
    +
    +    :param other: a value or :class:`Column`
    +
    +    >>> from pyspark.sql import Row
    +    >>> df1 = spark.createDataFrame([
    +    ...     Row(id=1, value='foo'),
    +    ...     Row(id=2, value=None)
    +    ... ])
    +    >>> df1.select(
    +    ...     df1['value'] != 'foo',
    +    ...     df1['value'].isDistinctFrom('foo'),
    +    ...     df1['value'].isDistinctFrom(None)
    +    ... ).show()
    +    +-------------------+---------------------+----------------------+
    +    |(NOT (value = foo))|(NOT (value <=> foo))|(NOT (value <=> NULL))|
    +    +-------------------+---------------------+----------------------+
    +    |              false|                false|                  true|
    +    |               null|                 true|                 false|
    +    +-------------------+---------------------+----------------------+
    +
    +    .. note:: Unlike Pandas, PySpark doesn't consider NaN values to be 
NULL.
    +       See the `NaN Semantics`_ for details.
    +    .. _NaN Semantics:
    +       
https://spark.apache.org/docs/latest/sql-programming-guide.html#nan-semantics
    +    .. versionadded:: 2.3.0
    +    """
    --- End diff --
    
    ![2017-05-02 12 41 
02](https://cloud.githubusercontent.com/assets/6477701/25603406/5de1c57a-2f36-11e7-8f62-fd20494a4434.png)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to