title: missing in function applied to pandas dataframe column
body: <p>I'm trying to apply a function to my 'age' and 'area' columns in order to get the results that I show in the column 'wanted'.</p>
  
  <p>Unfortunately this funtion gives me errors. I know that there are other methods in Pandas, like iloc, but I would like to understand this particular situation. </p>
  
  <pre><code>raw_data = {'age': [-1, np.nan, 10, 300, 20],'area': ['N','S','W',np.nan,np.nan],
      'wanted': ['A',np.nan,'A',np.nan,np.nan]}
  df = pd.DataFrame(raw_data, columns = ['age','area','wanted'])
  df
  
  def my_funct(df) :
  
      if df["age"].isnull() :
          return np.nan 
      elif df["area"].notnull():
          return 'A'
      else:
          return np.nan
  
  df["target"] = df.apply(lambda df:my_funct(df) ,axis = 1)
  </code></pre>