title: itertools product() function with sum
body: <p>I have a single dataframe A with several columns and I would like to sum all those columns "with themselves" to get a dataframe B.</p>
  
  <pre><code>A = [col1 col2 col3 
         0    1    2
         1    1    0
        -1    0    1]
  </code></pre>
  
  <p>and B should look like:</p>
  
  <pre><code>B = [col1+col2  col1+col3  col2+col3
           1          2           3
           2          1           1
          -1          0           1]
  </code></pre>
  
  <p>Basically, the philosophy behind this operation is exactly what is embedded in the itertools.product() function, that yields a cartesian product.</p>
  
  <p>itertools.product('ABCD', 'xy') --> Ax Ay Bx By Cx Cy Dx Dy</p>
  
  <p>I just need to apply the same principle and get :<br>
  function_smg('ABCD', 'xy') --> A+x A+y B+x B+y C+x C+y D+x D+y</p>
  
  <p>My dataframe is huge so I can't afford for loops and I need an iterator or a generator. 
  If there's no function that does the trick, how can I build a generator to do so?</p>
  
  <p>Thanks a lot</p>