wunderalbert commented on code in PR #45197:
URL: https://github.com/apache/spark/pull/45197#discussion_r1499320875
##########
python/pyspark/sql/dataframe.py:
##########
@@ -3526,8 +3526,8 @@ def head(self, n: Optional[int] = None) ->
Union[Optional[Row], List[Row]]:
Returns
-------
- If n is greater than 1, return a list of :class:`Row`.
- If n is 1, return a single Row.
+ If n is supplied, return a list of :class:`Row`.
Review Comment:
Good point. I'm suggesting adding this as an example, and extending the
`returns` section to mention the length of the list (see commit below).
--
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]