zhengruifeng commented on code in PR #37801:
URL: https://github.com/apache/spark/pull/37801#discussion_r964331381
##########
python/pyspark/pandas/tests/test_groupby.py:
##########
@@ -1380,8 +1380,18 @@ def test_nth(self):
for n in [0, 1, 2, 128, -1, -2, -128]:
self._test_stat_func(lambda groupby_obj: groupby_obj.nth(n))
+ pdf, psdf = self.pdf, self.psdf
with self.assertRaisesRegex(TypeError, "Unsupported type"):
- self.psdf.groupby("B").nth("x")
+ psdf.groupby("B").nth("x")
+
+ # in case there is no aggregation columns, the results should be the
same
+ if LooseVersion("1.4.0") <= LooseVersion(pd.__version__) <
LooseVersion("1.5.0"):
Review Comment:
`< LooseVersion("1.5.0")`
I think only `1.4.x` will test this case
--
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]