asl3 commented on code in PR #42158:
URL: https://github.com/apache/spark/pull/42158#discussion_r1275713420
##########
python/pyspark/pandas/tests/test_utils.py:
##########
@@ -105,6 +107,72 @@ def test_validate_index_loc(self):
with self.assertRaisesRegex(IndexError, err_msg):
validate_index_loc(psidx, -4)
+ def test_assert_df_assertPandasOnSparkEqual(self):
+ import pyspark.pandas as ps
+
+ psdf1 = ps.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6], "c": [7, 8, 9]})
+ psdf2 = ps.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6], "c": [7, 8, 9]})
+
+ assertPandasOnSparkEqual(psdf1, psdf2)
+ assertPandasOnSparkEqual(psdf1, psdf2, checkRowOrder=True)
Review Comment:
`checkRowOrder` is False by default, but I can explicitly say it in the test
to clarify
We want to make `assertPandasOnSparkEqual` a public API to allow users to
compare other pandas-on-Spark objects, like Series and Index in addition to
DataFrame
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]