for index, elem in enumerate(df['ad_requests']):
    if pd.isnull(elem):
        df.at[index, 'ad_requests'] = df.at[index - 1, 'ad_requests'] - df.at[
            index - 1, 'impressions']
Using the values of a previous "row" in a pandas series