Yikun commented on code in PR #36464:
URL: https://github.com/apache/spark/pull/36464#discussion_r870137936
##########
python/pyspark/pandas/groupby.py:
##########
@@ -2228,6 +2299,20 @@ def tail(self, n: int = 5) -> FrameLike:
6 5
9 8
Name: b, dtype: int64
+
+ # Supports Groupby positional indexing Since pandas on Spark 3.4 (with
pandas 1.4+)
+ >>> df = ps.DataFrame([["g", "g0"],
+ ... ["g", "g1"],
+ ... ["g", "g2"],
+ ... ["g", "g3"],
+ ... ["h", "h0"],
+ ... ["h", "h1"]], columns=["A", "B"])
+ >>> df.groupby("A").tail(-1) # doctest: +SKIP
Review Comment:
I record a jira SPARK-39150 as reminder to remove `# doctest: +SKIP` when we
upgrade pandas to 1.4.x
--
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]