Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/6601#discussion_r31592040
--- Diff: python/pyspark/sql/dataframe.py ---
@@ -653,9 +627,11 @@ def describe(self, *cols):
@ignore_unicode_prefix
@since(1.3)
def head(self, n=None):
- """
- Returns the first ``n`` rows as a list of :class:`Row`,
- or the first :class:`Row` if ``n`` is ``None.``
+ """Returns the first ``n`` rows.
+
+ If n is greater than 1, return a list of :class:`Row`. If n is 1,
return a single Row.
+
+ :param n: int, default 1.
--- End diff --
head() is different head(1), so we can not say `n` has `1` as default
value.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]