title: How to append a third column in a dataframe using conditions from 2 other columns in a dataframe
body: <p>I have the following data frame,</p>
  
  <pre><code>uuid    variable    value
  AAS Highly_Active   False
  AAS Highly_Active   True
  SAP Highly_Active   False
  SAP Multiple_days   True
  YAS Highly_Active   False
  YAS Highly_Active   False
  YAS Busi_weekday    False
  </code></pre>
  
  <p>And I need to use the values from the column <code>variable</code> and <code>value</code> to define third column <code>Activity</code> and I have following classic python code doing it but my primary data frame is 121Mb in size and so its taking long time. Any pandas solutions would be great</p>
  
  <pre><code>def activity(row):
      if row['variable'] == "Highly_Active" and row['value'] ==True:
          val = "Highly_Active"    
      else:
          val = "NO"
      if row['variable'] == "Multiple_days" and row['value']==True:
          val = "Multiple_days"    
      else:
          val = "NO" 
      if row['variable'] == "Busi_weekday" and row['value']==True:
          val = "Busi_weekday"
      else:
          val="NO"
      return val
  </code></pre>