xinrong-databricks commented on code in PR #36309:
URL: https://github.com/apache/spark/pull/36309#discussion_r857870812
##########
python/pyspark/pandas/tests/test_groupby.py:
##########
@@ -1257,7 +1258,34 @@ def _test_stat_func(self, func):
(pdf.groupby("A"), psdf.groupby("A")),
(pdf.groupby("A")[["C"]], psdf.groupby("A")[["C"]]),
]:
- self.assert_eq(func(p_groupby_obj).sort_index(),
func(ps_groupby_obj).sort_index())
+ self.assert_eq(
+ func(p_groupby_obj).sort_index(),
+ func(ps_groupby_obj).sort_index(),
+ check_exact=check_exact,
+ )
+
+ def test_basic_stat_funcs(self):
+ self._test_stat_func(lambda groupby_obj: groupby_obj.mean(),
check_exact=False)
+ self._test_stat_func(lambda groupby_obj: groupby_obj.std(),
check_exact=False)
Review Comment:
Good catch! May I file a follow-up PR for the fix of `std`? Now tests are
separated.
--
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]