title: How to refer to empty cell in pandas transformation
body: <p>I am trying to write code that will create a new excel document with a new column that has different values depending on the existing data. Specifically, if a cell under "Servicer" is empty, I would like a new column named "Needs Cleanup?" to say "Yes" in that row, and otherwise say "No". I would expect the following code to work, but it returns "No" for every row, even if the "Servicer" cell is empty. I have also tried using the python value <code>None</code> in place of <code>''</code> with the same results.</p>
  
  <pre><code>filepath = 'C:/Users/jackley/Desktop/'
  
  filename = 'test.xlsx'
  
  df = pd.read_excel(filepath+filename)
  
  df["Needs Cleanup?"]=df["Servicer"].apply(lambda x: "Yes" if x == '' else "No")
  
  df.to_excel(filepath+"test"+filename,index=False)
  </code></pre>
  
  <p>I have used this code structure to create conditional values for a new column without problem, as long as my if/else statements were referring to values that did actually show up in the "Servicer" column. It is just when I try to create a conditional statement based on whether a cell is empty that I am having this problem. Is there a way within this code structure to return different values based on whether an indicated cell is empty?</p>
  
  <p>Any help would be very much appreciated, thanks in advance</p>