title: To check Pandas Dataframe column for TRUE/FALSE, if TRUE check another column for condition to satisfy and generate new column with values PASS/FAIL
body: <p><strong>Input Explained:</strong>
  I have a dataframe 'df', which holds columns 'Space' and 'Threshold'.</p>
  <pre><code>Space   Threshold
  
  TRUE    0.1
  
  TRUE    0.25
  
  FALSE   0.5
  
  FALSE   0.6
  </code></pre>
  <p><strong>Scenario to consider:</strong>
  When df['Space'] is TRUE, check df['Threshold']&lt;=0.2 and if both condition satisfies generate a new column called df['Space_Test'] with value PASS/FAIL. If df['Space'] value is FALSE, put 'FALSE' as value to newly generated column df['Space_Test'].</p>
  <p><strong>Expected Output:</strong></p>
  <pre><code>Space   Threshold   Space_Test
  
  TRUE    0.1         PASS
  
  TRUE    0.25        FAIL
  
  FALSE   0.5         FALSE   
  
  FALSE   0.6         FALSE   
  </code></pre>
  <p><strong>Tried Code:</strong>
  Have tried out the below mentioned codeline for above mentioned scenario but doesn't works.</p>
  <pre><code>df['Space_Test'] = np.where(df['Space'] == 'TRUE',np.where(df['Threshold'] &lt;= 0.2, 'Pass', 'Fail'),'FALSE')
  </code></pre>
  <p>In need of help to resolve this. Thanks in Advance!</p>