I have a DF below
DF
ID name qty price date Freq
1 abc 20 3 17/01/2022 4
1 abc 10 5 18/03/2022 3
2 def 10 7 24/01/2022 1
2 def 40 2 25/05/2022 6
3 ghi 322 7 4/5/2022 12
My expectation is to add freq to date column by months and project for 12 months.
and multiple qty with price as Amt columns and display the same value for the proj months.
Expected Output
Solution I tried
DF[‘col1’] = DF.apply(lambda x:x[‘date’] + pd.offsets.DateOffset(months=x[‘Freq’]),1).
I know the above query just add months but I need to project this for 12 months as mentioned in expected output.
Note1 – Col5 goes till col12 since I projecting it for 12 months.