I am trying to get the mean of 30 most recent points in column a
for each type of product specified in column b
given a date column c
.
So the calculation of the average will be based on the most recent 30 points of each particular Product
as opposed to the overall most recent data points of the whole DataFrame
.
df:
Product Value Date
POL Mumbai 22.5 2015-6-26
STOLCO Finesse 55.5 2015-7-1
MPLR Pure 85.0 2015-8-1