title: If statement in pandas DataFrame, boolean column calculated from three other columns that may contain nan
body: <p>I am determining a boolean to put in column <code>A</code>, given the values of column <code>B</code>, <code>C</code>, and <code>D</code>.</p>
  
  <p>Columns <code>B</code>, <code>C</code>, <code>D</code> contain booleans, but also possibly <code>nan</code>.</p>
  
  <p>I need this statement to result in the following</p>
  
  <p>Column <code>A</code> should be...</p>
  
  <pre><code>True if [B,C,D] = [False, False, False]
  False if [B,C,D] contains True, regardless of other values
  nan if columns [B,C,D] contain only False or nan
  </code></pre>
  
  <p>Unfortunately, <code>nan</code> values are returning <code>False</code>, so the following code does not work.</p>
  
  <pre><code> df['A'] = ~(df['B'] | df['C'] | df['D'])
  </code></pre>
  
  <p>Thank you.</p>
  
  <p>Edit to clarify wording:</p>
  
  <p>The above three situations were considered to follow one another. The only condition which returns True is FFF. Any true in the set should return false. And any set that contains some combo of FF and nan should return nan. In the third situation, I can no longer say for sure that this row is triple negative, and so I return nan. Any row with a True in B|C|D is definitely not triple negative. </p>