title: How to get all the rows from spark DataFrame?
body: <pre><code>scala&gt; val results = spark.sql("select _c1, count(1) from data group by _c1 order by count(*) desc")
  results: org.apache.spark.sql.DataFrame = [_c1: string, count(1): bigint]
  
  scala&gt; results.persist()
  res18: results.type = [_c1: string, count(1): bigint]
  
  scala&gt; results.show(20, false)
  </code></pre>
  
  <p>This code gets only the top 20 rows. How can I get the full list of rows? Any help would be appreciated <a href="https://i.stack.imgur.com/tFZ4L.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tFZ4L.png" alt="enter image description here"></a></p>