QST: pandas rolling enabling offset even if my index is not datetime
For this dataframe 

    df = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]},index=[0.1,0.2,0.5,0.7,0.9])

df

           B
    0.1  0.0
    0.2  1.0
    0.5  2.0
    0.7  NaN
    0.9  4.0

I want to perform an offset based rolling like: 

    df.rolling(0.3).sum()

But I got this error:

> ValueError: window must be an integer

Could anyone help me? my real case involves about 1B rows, and I needed to do groupby().rolling() in the end. The above is just an extreme simplification of my problem. Please help me. Thanks!


