You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/12/01 15:47:09 UTC

[GitHub] [beam] roger-mike commented on a change in pull request #16027: [WIP][BEAM-12565] Dataframe compare implementation

roger-mike commented on a change in pull request #16027:
URL: https://github.com/apache/beam/pull/16027#discussion_r760314080



##########
File path: sdks/python/apache_beam/dataframe/frames_test.py
##########
@@ -1082,6 +1082,50 @@ def test_dt_tz_localize_nonexistent(self):
             'Europe/Warsaw', ambiguous='NaT', nonexistent=pd.Timedelta('1H')),
         s)
 
+  def test_compare_series(self):
+    s1 = pd.Series(["a", "b", "c", "d", "e"])
+    s2 = pd.Series(["a", "a", "c", "b", "e"])
+
+    self._run_test(lambda s1, s2: s1.compare(s2), s1, s2)
+    self._run_test(lambda s1, s2: s1.compare(s2, align_axis=0), s1, s2)
+    self._run_test(lambda s1, s2: s1.compare(s2, keep_shape=True), s1, s2)
+    self._run_test(
+        lambda s1, s2: s1.compare(s2, keep_shape=True, keep_equal=True), s1, s2)
+
+  def test_compare_dataframe(self):

Review comment:
       The test for `Dataframe.compare` in `pandas_doctests.test.py` was skipped because it tries to apply a `loc` to `df2` and it's not implemented, making the tests fail.




-- 
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: github-unsubscribe@beam.apache.org

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