You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2023/08/04 01:37:38 UTC

[GitHub] [spark] zhengruifeng commented on a diff in pull request #42332: [SPARK-44665] Add support for pandas DataFrame assertDataFrameEqual

zhengruifeng commented on code in PR #42332:
URL: https://github.com/apache/spark/pull/42332#discussion_r1283884122


##########
python/pyspark/sql/tests/test_utils.py:
##########
@@ -746,28 +748,123 @@ def test_assert_unequal_null_expected(self):
         )
 
     def test_assert_equal_exact_pandas_df(self):
+        df1 = pd.DataFrame(
+            data=np.array([(1, 2, 3), (4, 5, 6), (7, 8, 9)]), columns=["a", "b", "c"]
+        )
+        df2 = pd.DataFrame(
+            data=np.array([(1, 2, 3), (4, 5, 6), (7, 8, 9)]), columns=["a", "b", "c"]
+        )
+
+        assertDataFrameEqual(df1, df2, checkRowOrder=False)

Review Comment:
   just out of curiosity, will it have different behaviors from pandas's [assert_frame_equal](https://github.com/pandas-dev/pandas/blob/3713834bcfbd476a42293a941f127b7fecfb8dc2/pandas/_testing/asserters.py#L1032)?



-- 
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