wunderalbert opened a new pull request, #45197: URL: https://github.com/apache/spark/pull/45197
### What changes were proposed in this pull request? Change description of `returns` in docstring for pyspark's dataframe's `head` to match actual behaviour. ### Why are the changes needed? The docstring claimed that `head(n)` would return a `Row` (rather than a list of rows) iff n == 1, but that's incorrect. Type hints, example, and implementation show that the difference between row or list of rows lies in whether n is supplied at all -- if it isn't, `head()` returns a `Row`, if it is, even if it is 1, `head(n)` returns a list. ### Does this PR introduce _any_ user-facing change? Yes, if you count a changed docstring as e.g. be displayed by hover and similar ways in many IDEs. ### How was this patch tested? No tests were added since only docs changed. ### Was this patch authored or co-authored using generative AI tooling? No. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org