I am new to python and have a few questions regarding dates.
Here is an example - I have a list of dates going from 01/01/2012 - 01/01/2025 with a monthly frequency. They also will change based on the data frame. Say one column of dates will have 130 months in between, the other will have 140 months, and so on.
The end goal is: regardless of how many months each set has, I need each "group" to have 180 months. So, in the above example of 01/01/2012 - 1/1/2025, I would need to add enough months to reach 1/1/2027.
Please let me know if this makes sense.
So if I understand you correctly, you have some data like:
so the current duration in months is:
and you want to know how many to add to make the duration 180 months?
then you can calculate a new end by something like:
I'm sure I haven't quite understood, as you could just add 180 months to the start date, but hopefully this gets you close to where you need to be.