I have a dataframe that looks like this:
Name A B C
D1 1 3 3
D2 2 4 4
D3 2 1 1
How can I create a new dataframe of the same size where every value is today's date minus the value of my first dataframe?
for example, if today is 2018-04-27, my new dataframe would look like this:
Name A B C
D1 2018-04-26 2018-04-24 2018-04-24
D2 2018-04-25 2018-04-23 2018-04-23
D3 2018-04-25 2018-04-26 2018-04-26
I'm thinking the solution will include something like
df2.iloc[1,1] = datetime.today() - timedelta(days=df1[1,1])
but I'm running into all kinds of type errors and problems looping through the original df