title: If-else ValueError The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()
body: <p>I am trying to fill the missing values using if-else condition but getting the value error 
  How can I resolve? 
  I read another similar post but couldn't apply to my problem</p>
  
  <p>I have tried if-else (value error) and also, iterate through indexing using for loop </p>
  
  <p>When using for loop, it runs all rows through only if statement, and not going to else</p>
  
  <p>Only if else statement(Value error)</p>
  
  <pre><code>if data['Waiting Time'] &gt; 0:
      data['Existing_Date'].fillna(data['New_time'],inplace=True) #if wait_time &gt; 0         
  else:
      data['Existing_Date'].fillna(data['Actual Date'],inplace=True) #if wait_time &gt; 0
  </code></pre>
  
  <p>Using For-loop indexing(only running if statement )</p>
  
  <pre><code>for i in data.index:
      if data['Waiting Time'].iloc[i] &gt; 0:
          data['Existing_Date'].fillna(data['New_time'],inplace=True) #if wait_time &gt; 0    
      else:
          data['Existing_Date'].fillna(data['Actual Date'],inplace=True) #if wait_time = 0
  </code></pre>
  
  <p>With if only statement Value error</p>
  
  <p>with for loop: only result in if statement, not going to else statement </p>
  
  <p>How can I solve this? Thanks</p>