Faster function iteration on Pandas df with axis=1
The easiest way to get a small speed-up  is swap these two lines:

filterdatemediaplanid_day = (atlas_df.Date == row.Date) &amp; (atlas_df.MediaPlanIndex == row.MediaPlanIndex)
filterdatemediaplanid_total = (atlas_df.MediaPlanIndex == row.MediaPlanIndex)


to:

filterdatemediaplanid_total = (atlas_df.MediaPlanIndex == row.MediaPlanIndex)
filterdatemediaplanid_day = (atlas_df.Date == row.Date) &amp; filterdatemediaplanid_total


This part of the code does not serve any purpose:

if row.Amnet == "Amnet":
    spend = atlas_df.AmnetCost * (row.Impressions / filterdatemediaplanid_day)


Since you don't return right away and afterwards comes an if/elif/else block that is guaranteed to modify spend, anything you calculate here will be overwritten.

While some people adhere to the single exit policy, I prefer early returns:

if row.CostMethod == 'FLF' or row.CostMethod == 'CPH':
    total_impressions = atlas_df.ix[filterdatemediaplanid_total, 'Impressions'].sum()
    if total_impressions &gt;= 500:
        return row.BookedRate * (row.Impressions/ total_impressions)
elif row.CostMethod == 'CPC':
    return row.BookedRate * row.Clicks
elif row.CostMethod == 'CPM':
    return row.BookedRate * row.Impressions / 1000.0
return 0


total_impressions_day is not used anywhere and total_impressions should only be calculated if needed.