HyukjinKwon commented on code in PR #41674:
URL: https://github.com/apache/spark/pull/41674#discussion_r1236213669
##########
python/pyspark/sql/group.py:
##########
@@ -70,6 +70,9 @@ def __init__(self, jgd: JavaObject, df: DataFrame):
self._df = df
self.session: SparkSession = df.sparkSession
+ def __repr__(self) -> str:
+ return f"GroupedData{self._jgd.toString()[26:]}"
Review Comment:
I would put 26 to a separate variable (with some comments), and add an
assert if the truncated string starts with `[` ..
--
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]