title: Python new column based on NaN in other columns
body: <p>I'm quite new to Python and this is my first ever question so please be gentle with me! </p>
  
  <p>I have tried out answers to other similar questions but am still quite stuck.</p>
  
  <p>I am using Pandas and I have a dataframe which is a merge from multiple different SQL tables and looks something like this:</p>
  
  <pre><code>Col_1   Col_2   Col_3   Col_4
  1       NaN     NaN     NaN
  2       Y       NaN     NaN
  3       Z       C       S
  4       NaN     B       W
  </code></pre>
  
  <p>I don't care about the values in Col_2 Col_3 and Col_4 (note these can be strings or integers or objects depending on the column)</p>
  
  <p>I just care that at least one of these columns is populated so ideally would like a fifth column like:</p>
  
  <pre><code>Col_1   Col_2   Col_3   Col_4   Col_5
  1       NaN     NaN     NaN     0
  2       Y       NaN     NaN     1
  3       Z       C       S       1
  4       NaN     B       W       1
  </code></pre>
  
  <p>Then I want to drop the columns Col_2 to Col_4.</p>
  
  <p>My initial thought was something like the function below, but this is reducing my dataframe from 50000 rows to 50. I don't want to delete any rows.</p>
  
  <pre><code>def function(row):
     if (isnull.row['col_2'] and isnull.row['col_3'] and isnull.row['col_3'] is None):
        return '0'
     else:
        return '1'
  
  df['col_5'] = df.apply(lambda row: function (row),axis=1)
  </code></pre>
  
  <p>Any help would be much appreciated.</p>