I have a big data frame with 2 groups: score and day. Is there a simple possibility with pandas tools to fill the gaps and the missing scores with the average (alternative ewma etc..) of the values before.
First of all I group overwrite the scores by grouping and later stack the modified grouped df's together.
dfg = df.groupby(['g1','g2'])
for name , group in dfg:
print group
break
ix g1 g2 score day
4 19 24 4.150513 2014-02-12
5 19 24 6.986235 2014-02-13
6 19 24 9.634231 2014-02-14
7 19 24 1.818548 2014-02-15
8 19 24 1.699897 2014-03-02
9 19 24 2.128781 2014-03-25
10 19 24 1.720297 2014-03-26
14 19 24 2.079877 2014-03-30