title: How to append a column to a dataframe with values from a specified column index
body: <p>I have a dataframe in which one of the columns is used to designate which of the other columns has the specific value I'm looking for.</p>
  <pre><code>df = pd.DataFrame({'COL1':['X','Y','Z'],'COL2':['A','B','C'],'X_SORT':['COL1','COL2','COL1']})
  </code></pre>
  <p>I'm trying to add a new column called 'X_SORT_VALUE' and assigning the value of the column identified in the X_SORT column.</p>
  <pre><code>df = df.assign(X_SORT_VALUE=lambda x: (x['X_SORT']))
  </code></pre>
  <p>But I'm getting the value of the X_SORT column:</p>
  <pre><code>  COL1 COL2 X_SORT X_SORT_VALUE
  0    X    A   COL1         COL1
  1    Y    B   COL2         COL2
  2    Z    C   COL1         COL1
  </code></pre>
  <p>Rather than getting the value of that column index, like I want:</p>
  <pre><code>  COL1 COL2 X_SORT X_SORT_VALUE
  0    X    A   COL1         X
  1    Y    B   COL2         B
  2    Z    C   COL1         Z
  </code></pre>