How can I add a new column to a dataframe that adds to the dates in another column?

Viewed 41

I want to automatically get rows with dates that are 90 days away from expiration and send me an email with the rows of what is expiring.

import pandas as pd
import numpy as np
from datetime import date

today = date.today()
fromtoday = pd.DateOffset(days=89)
90days_away = today + fromtoday

expiration date column in my dataframe:

expirations = df[df['Ad Expiration'].notnull()]

What I'm trying to do now is create a column that sums my expirations column with 90days_away I think I somehow need to apply the 90days_away to all rows? but i can't do that manually.

Also worth noting that I've only been studying python for about a week and a half, so I still don't know the best way to do things. Thank you!

0 Answers
Related