title: Count values of list from csv to table
body: <p>I am trying to create a program using Python, where I want a table which is created according to the data present in another table.
  The data in the primary table does not have a pattern, and they are count of values from another table. </p>
  
  <p>For example under (1,1) (row, column) the number is 15 which is the total number of 1's present in the first column of the second table. The range of the second table is 1-5 as rows and 1-10 as columns, and the tables are present in a CSV file. </p>
  
  <p><a href="https://i.stack.imgur.com/AafGo.png" rel="nofollow noreferrer">image representing the two tables </a></p>
  
  <pre><code>import numpy as np
  
  RangeNumber = 10
  abcde = []
  counta = 0
  countb = 0
  
  with open('loto1_count.csv', 'w+') as f:
      readCSV = list(csv.reader(f, delimiter=';'))
      for a in range(1, RangeNumber - 4):
          for b in range(a + 1, RangeNumber - 3):
              for c in range(b + 1, RangeNumber - 2):
                  for d in range(c + 1, RangeNumber - 1):
                      for e in range(d + 1, RangeNumber):
                          abcde = [a, b, c, d, e]
                          val = str(abcde)
  
                          array1 = np.asarray(val)
  
                          if a == 1:
                              counta += 1
                          elif a == 2:
                              countb += 1
  
  
                          f.write(val1)
  
  
  l = len(array1)
  print(abcde)            
  print(counta)
  print(countb)
  f.close 
  </code></pre>
  
  <p>`</p>
  
  <p>Above is the code that I tried creating the sum of numbers but the length increases as the count increase which would create a large number of variables and confusion. </p>
  
  <p>Thanks in advance for the help.</p>