title: Summarise data by using index i
body: <p>Codes:</p>
  
  <pre><code>for i, words in enumerate(list):
      syn = eachscore(num)
      for score in syn:
          count = count + 1
          sscore = str(score).split()
          first = sscore[2]
          second = sscore[4]
          sumf = float(sumf) + float(first)
          sums = float(sumd) + float(second)
      print i, words, sumf, sums
  </code></pre>
  
  <p>Results show:</p>
  
  <pre><code>0   A1  10  0
  0   B1  2   27
  1   B3  0   7
  0   C1  1   10
  1   C2  5   5
  0   D1  10  1
  1   D2  31  20
  2   D5  20  10
  </code></pre>
  
  <p>I am trying to group the data.</p>
  
  <p>Could someone suggest the way to sum the data by using index 'i' ? Please ...</p>
  
  <p>Expect results:</p>
  
  <pre><code>A1  10  0
  B1 B3   2   34
  C1 C2   6   15
  D1 D2 D5    61  31
  </code></pre>