Here is a sample dataset:
ID Date
1 2/3/18
1 2/7/18
1 2/14/18
1 2/16/18
Here is what the final feature will look like:
ID Date Running_Mean
1 2/3/18 0
1 2/7/18 4
1 2/14/18 5.5
1 2/16/18 4.33
This is a rolling window that starts at the beginning of a sequence and continues to expand with the dataset.
Any help would be much appreciated.