title: Pandas apply based on conditional from another column
body: <p>I'm looking to adjust values of one column based on a conditional in another column.</p>
  
  <p>I'm using np.busday_count, but I don't want the weekend values to behave like a Monday (Sat to Tues is given 1 working day, I'd like that to be 2)</p>
  
  <pre><code>dispdf = df[(df.dispatched_at.isnull()==False) &amp; (df.sold_at.isnull()==False)]
  
  dispdf["dispatch_working_days"] = np.busday_count(dispdf.sold_at.tolist(), dispdf.dispatched_at.tolist())
  
  for i in range(len(dispdf)):
      if dispdf.dayofweek.iloc[i] == 5 or dispdf.dayofweek.iloc[i] == 6:
          dispdf.dispatch_working_days.iloc[i] +=1
  </code></pre>
  
  <p>Sample:</p>
  
  <pre><code>            dayofweek   dispatch_working_days
      43159   1.0 3
      48144   3.0 3
      45251   6.0 1
      49193   3.0 0
      42470   3.0 1
      47874   6.0 1
      44500   3.0 1
      43031   6.0 3
      43193   0.0 4
      43591   6.0 3
  </code></pre>
  
  <p>Expected Results:</p>
  
  <pre><code>        dayofweek   dispatch_working_days
  43159   1.0 3
  48144   3.0 3
  45251   6.0 2
  49193   3.0 0
  42470   3.0 1
  47874   6.0 2
  44500   3.0 1
  43031   6.0 2
  43193   0.0 4
  43591   6.0 4
  </code></pre>
  
  <p>At the moment I'm using this for loop to add a working day to Saturday and Sunday values. It's slow!</p>
  
  <p>Can I use a vectorization instead to speed this up. I tried using .apply but to no avail.</p>