title: taking the average of a column in RDD-spark-scala
body: <p>I have a dataset like below. I just need to know how to get the average of physics marks for the whole students in a class. using spark+scala whithout using dataframe.</p>
  
  <p>header</p>
  
  <pre><code>name|physics|biology
  ram|30|40
  sam|35|45
  ravi|37|44
  </code></pre>
  
  <p>outout should be something like </p>
  
  <p><code>physics|34</code> </p>
  
  <p>Thanks in advance.....</p>