allisonwang-db commented on code in PR #42158:
URL: https://github.com/apache/spark/pull/42158#discussion_r1275433100
##########
python/docs/source/reference/pyspark.testing.rst:
##########
@@ -27,3 +27,4 @@ Testing
assertDataFrameEqual
assertSchemaEqual
+ assertPandasOnSparkEqual
Review Comment:
nit: let's sort the names here
##########
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:
WDYT cc @allanf-db @HyukjinKwon
--
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]