title: How to calculate cumulative sum and average on file data in python
body: <p>I have a below data in file</p>
  <pre><code>NAME,AGE,MARKS
  A1,12,40
  B1,13,54
  C1,15,67
  D1,11,41
  E1,16,59
  F1,10,60
  </code></pre>
  <p>If the data was in database table , I would have used <code>Sum</code> and <code>Average</code> function to get the cumulative sum and average</p>
  <p>But How to get it with python is a bit challenging , As i am learner</p>
  <p><strong>Expected output :</strong></p>
  <pre><code> NAME,AGE,MARKS,CUM_SUM,AVG
      A1,12,40,40,40
      B1,13,54,94,47
      C1,15,67,161,53.66
      D1,11,41,202,50.5
      E1,16,59,261,43.5
      F1,10,60,321,45.85
  </code></pre>