Following up on this answer: Is there a way to do a weight-average rolling sum over a grouping?
rsum = pd.rolling_apply(g.values,p,lambda x: np.nansum(w*x),min_periods=p)
rolling_apply is deprecated now. How would you change this to work under current functionality.