title: Pandas: Column that is dependent on another value
body: <p>I have a Pandas dataframe like the following:</p>
  
  <pre><code>   col1  col2  col3  col4
  0     5     1    11     9
  1     2     3    14     7
  2     6     5    54     8
  3    11     2    67    44
  4    23     8     2    23
  5     1     5     9     8
  6     9     7    45    71
  </code></pre>
  
  <p>I want to make a 5th column (col5) that is dependent on the value of col1 and takes a value of one of the other columns.  </p>
  
  <p>Here's kind of how I want it to look, but am having some issues.</p>
  
  <pre><code>if col1 &lt; 3:
     col5 == col2
  elif col1 &lt; 7 &amp; col1 &gt;= 3:
     col5 == col3
  elif col1 &gt;= 7 &amp; col1 &lt; 50:
     col5 == col4
  </code></pre>
  
  <p>Which would produce the following dataframe:</p>
  
  <pre><code>   col1  col2  col3  col4  col5
  0     5     1    11     9    11
  1     2     3    14     7     3
  2     6     5    54     8    54
  3    11     2    67    44    44
  4    23     8     2    23    23
  5    97     5     9     8     8
  6     9     7    45    71    71
  </code></pre>
  
  <p>Thanks in advance and let me know if you have any questions</p>