rohdesamuel commented on a change in pull request #14327:
URL: https://github.com/apache/beam/pull/14327#discussion_r610024537



##########
File path: sdks/python/apache_beam/dataframe/frames_test.py
##########
@@ -526,13 +526,12 @@ def test_dataframe_cov_corr(self):
     df = pd.DataFrame(np.random.randn(20, 3), columns=['a', 'b', 'c'])
     df.loc[df.index[:5], 'a'] = np.nan
     df.loc[df.index[5:10], 'b'] = np.nan
-    self._run_test(lambda df: df.corr().round(8), df)
-    self._run_test(lambda df: df.cov().round(8), df)
-    self._run_test(lambda df: df.corr(min_periods=12).round(8), df)
-    self._run_test(lambda df: df.cov(min_periods=12).round(8), df)
-    self._run_test(lambda df: df.corrwith(df.a).round(8), df)
-    self._run_test(
-        lambda df: df[['a', 'b']].corrwith(df[['b', 'c']]).round(8), df)
+    self._run_test(lambda df: df.corr(), df)
+    self._run_test(lambda df: df.cov(), df)
+    self._run_test(lambda df: df.corr(min_periods=12), df)
+    self._run_test(lambda df: df.cov(min_periods=12), df)
+    self._run_test(lambda df: df.corrwith(df.a), df)
+    self._run_test(lambda df: df[['a', 'b']].corrwith(df[['b', 'c']]), df)

Review comment:
       That would be true if there was only logic that wrapped the 
DataFrame.corr method, but there is manual logic here that unwraps the columns 
into every 2-combination and correlates those. It's a non-blocking issue so up 
to you.




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


Reply via email to