We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a21012b commit e3dd03fCopy full SHA for e3dd03f
sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala
@@ -230,8 +230,10 @@ class DataFrame private[sql](
230
231
sb.append(sep)
232
233
- // For Data that has more than 20 records.
234
- if (this.count() > 20) sb.append("only showing the top 20 rows\n")
+ // For Data that has more than N(numRows) records.
+ if (take(numRows + 1).length > numRows) {
235
+ sb.append("only showing the top " + numRows.toString + " rows\n")
236
+ }
237
238
sb.toString()
239
}
@@ -362,7 +364,7 @@ class DataFrame private[sql](
362
364
363
365
/**
366
* Returns a [[DataFrameNaFunctions]] for working with missing data.
- * {{{
367
+ * {{{
368
* // Dropping rows containing any null values.
369
* df.na.drop()
370
* }}}
0 commit comments