I have a variable "Age" with varying measures for age stored as a string. Example:
Age = ("3 weeks" , "2 years" , "1 day", "4 weeks")
I am interested in using the time measure (weeks, years, day) to convert the variable to an integer expressing the number in the string as a fraction of a year. In other words, I want to convert 3 weeks into the equivalent of 3/52 in int form.
Any suggestions on how I can do this in pandas? Appreciate any advice that is forthcoming.
M