title: apache spark agg( ) function
body: <p>For a sample dataframe <code>scholor</code>,</p>
  
  <pre><code>scala&gt; scholor.show
  
  | id|  name|age|sal|base|
  </code></pre>
  
  <p>For above, both below, gives same output. What will be use of agg() then. It just for name. </p>
  
  <pre><code>scala&gt; scholor.groupBy("age").sum("base").show      /*with out agg */
  
  scala&gt; scholor.groupBy("age").agg(sum("base")).show        /* with agg */
  </code></pre>
  
  <pre class="lang-none prettyprint-override"><code>+---+---------+
  |age|sum(base)|
  +---+---------+
  </code></pre>
  
  <p>Does <code>agg()</code> need any varargs as arguments?
  What is need of <code>agg()</code>?</p>
  
  <p>Thanks in advance.</p>