title: pyspark - difference between select and agg
body: <p>What is the difference between the following two -</p>
  <p><code>df.select(min(&quot;salary&quot;)).show()</code></p>
  <p>and</p>
  <p><code>df.agg({'salary':'min'}).show()</code></p>
  <p>Also, what is the difference in these two -</p>
  <p><code>df.groupBy(&quot;department&quot;).agg({'salary':'min'}).show()</code></p>
  <p>and</p>
  <p><code>df.groupBy(&quot;Company&quot;).min('salary').show()</code></p>