You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2023/12/20 23:59:21 UTC

Re: [PR] [SPARK-46465][PYTHON][CONNECT] Add `Column.isNaN` in PySpark [spark]

HyukjinKwon commented on code in PR #44422:
URL: https://github.com/apache/spark/pull/44422#discussion_r1433288955


##########
python/pyspark/sql/column.py:
##########
@@ -1153,9 +1153,22 @@ def isin(self, *cols: Any) -> "Column":
     >>> df.filter(df.height.isNotNull()).collect()
     [Row(name='Tom', height=80)]
     """
+    _isNaN_doc = """
+    True if the current expression is NaN.
+
+    .. versionadded:: 4.0.0
+
+    Examples
+    --------
+    >>> from pyspark.sql import Row
+    >>> df = spark.createDataFrame([Row(name='Tom', height=80.0), Row(name='Alice', height=float('nan'))])

Review Comment:
   ```suggestion
       >>> df = spark.createDataFrame(
       ...     [Row(name='Tom', height=80.0), Row(name='Alice', height=float('nan'))])
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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