HyukjinKwon commented on a change in pull request #24844: [SPARK-28003][PYTHON]
Allow NaT values when creating Spark dataframe from pandas with Arrow
URL: https://github.com/apache/spark/pull/24844#discussion_r293233404
##########
File path: python/pyspark/sql/tests/test_arrow.py
##########
@@ -383,6 +383,18 @@ def test_timestamp_dst(self):
assert_frame_equal(pdf, df_from_python.toPandas())
assert_frame_equal(pdf, df_from_pandas.toPandas())
+ def test_timestamp_nat(self):
+ dt = [pd.NaT, pd.Timestamp('2019-06-11'), None] * 100
+ pdf = pd.DataFrame({'time': dt})
+
+ with self.sql_conf({'spark.sql.execution.arrow.pyspark.enabled':
"false"}):
Review comment:
not a big deal but I think we can do this with a for loop.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]