Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/4767#discussion_r25405074
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala ---
@@ -293,9 +294,15 @@ class DataFrame protected[sql](
* 1983 03 0.410516 0.442194
* 1984 04 0.450090 0.483521
* }}}
+ * @param numRows Number of rows to show
* @group basic
*/
- def show(): Unit = println(showString())
+ def show(numRows: Int = 20): Unit = println(showString(numRows))
+
+ /**
+ * Displays the [[DataFrame]] in a tabular form. (For Java compatibility)
+ */
+ def show(): Unit = println(showString(20))
--- End diff --
what I mean is...
```scala
/**
* Displays the [[DataFrame]] in a tabular form. For example:
* {{{
* year month AVG('Adj Close) MAX('Adj Close)
* 1980 12 0.503218 0.595103
* 1981 01 0.523289 0.570307
* 1982 02 0.436504 0.475256
* 1983 03 0.410516 0.442194
* 1984 04 0.450090 0.483521
* ...
* }}}
* @param numRows Number of rows to show
* @group basic
*/
def show(numRows: Int): Unit = println(showString(numRows))
/**
* Displays the top 20 rows of the [[DataFrame]] in a tabular form.
*/
def show(): Unit = show(20)
```
---
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]