title: Sum a list of Pandas DataFrames
body: <p>Is there a way to sum multiple pandas DataFrames using syntax similar to <code>pd.concat([df1, df2, df3, df4])</code>. I understand from documentation that I can do <code>df1.sum(df2, fill_value=0)</code>, but I have a long list of DataFrames I need to sum and was wondering if I could do it without writing a loop.</p>
  
  <p>Somewhat related question/answer: <a href="https://stackoverflow.com/questions/38472276/pandas-sum-multiple-dataframes">Pandas sum multiple dataframes</a> (Stack Overflow)</p>
  
  <p>Example of what the result should look like:</p>
  
  <pre><code>idx1 = pd.MultiIndex.from_tuples([('a', 'A'), ('a', 'B'), ('b', 'A'), ('b', 'D')])
  idx2 = pd.MultiIndex.from_tuples([('a', 'A'), ('a', 'C'), ('b', 'A'), ('b', 'C')])
  idx3 = pd.MultiIndex.from_tuples([('a', 'A'), ('a', 'D'), ('b', 'A'), ('b', 'C')])
  
  np.random.seed([3,1415])
  df1 = pd.DataFrame(np.random.randn(4, 1), idx1, ['val'])
  df2 = pd.DataFrame(np.random.randn(4, 1), idx2, ['val'])
  df3 = pd.DataFrame(np.random.randn(4, 1), idx3, ['val'])
  </code></pre>
  
  <p><strong>df1</strong></p>
  
  <p><a href="https://i.stack.imgur.com/8rDs7s.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8rDs7s.png" alt="enter image description here"></a></p>
  
  <p><strong>df2</strong></p>
  
  <p><a href="https://i.stack.imgur.com/EkZ2ys.png" rel="noreferrer"><img src="https://i.stack.imgur.com/EkZ2ys.png" alt="enter image description here"></a></p>
  
  <p><strong>df3</strong></p>
  
  <p><a href="https://i.stack.imgur.com/bwT9Ms.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bwT9Ms.png" alt="enter image description here"></a></p>
  
  <p><strong>The result should look like:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/yVXPEs.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yVXPEs.png" alt="enter image description here"></a></p>