I have a column of strings that give me month and day and day name as
Date Week Day
03-03 Friday
03-19 Saturday
03-18 Saturday
03-18 Monday
....
I want to return the most recent year, given those months and days, but also given the name of day.
so
Date Week Day Max Year
03-03 Friday 2018
03-19 Saturday 2016
03-18 Saturday 2017
03-18 Monday 2013
....
EDIT: Sorry forgot to add what I was thinking and trying
So I'm trying to do something like:
from datetime import datetime
day = 28
month = 3
name = 'Monday'
t = datetime.strptime('{}_{}_{}'.format(month,day,name), '%d_%m_%A')
t.strftime('%Y')
But it stores year as 1900. I'm just not sure how to get it to return the year as the most recent, or maxyear?