title: Apply if-then statement to multiple columns and output to new columns- Pandas
body: <p>I'm trying to apply an if-then statement over multiple columns, then have the results of that if-then statement outputted to new columns. My data looks like this:</p>
  
  <pre><code>    AtoB    BtoC    CtoD      
       240     600    1000
       -30     540     540
        50     -50       0
         0       0     -10
  </code></pre>
  
  <p>My desired output is:</p>
  
  <pre><code>    AtoB_C  BtoC_C  CtoD_C
           C       C       C
           E       C       C
           C       E       S
           S       S       E
  </code></pre>
  
  <p>The idea is that the result of the if-then statement is stored in these new variables and the original variables will still be present. The variables to be evaluated are in the "Results" list and the output variables (which have nothing in them at the moment) are in "Result_Correct" list My code is:</p>
  
  <pre><code>Result = ['AtoB','BtoC','CtoD'] 
  Result_Correct = ['AtoB_C','BtoC_C','CtoD_C']
      for row in DF[Result]:
          if row &gt; 0:
              [Result_Correct].append('c')
          elif row == 0:
              [Result_Correct].append('s')
          else:
              [Result_Correct].append('e')
      DF[Result_Correct] = [Result_Correct]
  </code></pre>
  
  <p>When I try running this, I get the message "'>' not supported between instances of 'str' and 'int'". How can I make this work? Thanks!</p>