title: Creating new columns from the unique pairs from list of columns
body: <p>Let's say I have a dataframe</p>
  <pre><code>       PTDF_DE  PTDF_FR    PTDF_HR 
  0        1          2         3     
  1        10         20        30   
  2        100        200       300
  </code></pre>
  <p>Now I want to have a new dataframe where I have columns created from every combination of 2 columns in the first dataframe with values such that I substract one column from the other.</p>
  <p>The resulting dataframe will be:</p>
  <pre><code>       PTDF_DE_PTDF_FR  PTDF_DE_PTDF_HR  PTDF_FR_PTDF_DE   PTDF_FR_PTDF_HR   PTDF_HR_PTDF_FR   PTDF_HR_PTDF_DE
  0        -1                  -2                1                -1                 1                  2
  1       -10                  -20               10               -10                10        20
  2      -100                  -200              100              -100               100      200
  </code></pre>
  <p>I did it with a double for loop, but is there a better way (beacuse I have lots of these columns)?</p>
  <pre><code>tso_names = ['DE', 'FR', 'HR']
  PTDF_tso_names = ['PTDF_' + tso for tso in tso_names]
  
  def substract_columns(column1, column2, row):
      return row[column1] - row[column2]
  
  for column1 in df[PTDF_tso_names]:
      for column2 in df[[x for x in PTDF_tso_names if x != column1]]:
          df[str(column1) + '_' + str(column2)] = df.apply(
              lambda row: substract_columns(column1, column2, row), axis=1)
  </code></pre>