title: sumifs function in python
body: <p>I have a list of lists that looks like:</p>
  
  <pre><code>[['chr1', '3088', '1', 744, 'L1MCc_dup1']
  ['chr1', '3089', '1', 744, 'L1MCc_dup1']
  ['chr1', '3090', '1', 744, 'L1MCc_dup1']
  ['chr1', '15037', '1', 96, 'MER63B']
  ['chr1', '15038', '1', 96, 'MER63B']
  ['chr1', '15039', '1', 96, 'MER63B']
  ['chr1', '15040', '1', 96, 'MER63B']
  ['chr1', '19465', '1', 418, 'MLT2B4_dup1']
  ['chr1', '19466', '1', 418, 'MLT2B4_dup1']
  ['chr1', '19467', '1', 418, 'MLT2B4_dup1']]
  </code></pre>
  
  <p>I need to make the equivalent of a <code>sumifs</code> function in python (as the file is too big for excel) to sum the contents of column 3 based on the identifier in column 5 (output can be some version of <code>L1MCc_dup1</code> is 3, <code>MER63B</code> is 4 and <code>MLT2B4_dup1</code> is 3). </p>
  
  <p>Any advice/help to make this function? </p>