title: Function Value with Combination(or Permutation) of Variables and Assign to Dataframe
body: <p>I have <code>n</code> variables. Suppose <code>n</code> equals 3 in this case. I want to apply one function to all of the combinations(or permutations, depending on how you want to solve this) of variables and store the result in the same row and column in dataframe.</p>
  <pre><code>a = 1
  b = 2
  c = 3
  indexes = ['a', 'b', 'c']
  df = pd.DataFrame({x:np.nan for x in indexes}, index=indexes)
  </code></pre>
  <p>If I apply sum(the function can be anything), then the result that I want to get is like this:</p>
  <pre><code>    a   b   c
  a   2   3   4
  b   3   4   5
  c   4   5   6
  </code></pre>
  <p>I can only think of iterating all the variables, apply the function one by one, and use the index of the iterators to set the value in the dataframe. Is there any better solution?</p>