To illustrate the issue
import pandas as pd
import numpy as np
def testfunc(x, mult=1):
res = sum(x)*mult
return res
series = pd.Series(np.random.rand(100), name='test')
I'd like to run 'testfunc' on rolling windows of size 10, say, of 'series' using the mult argument.
series.rolling(10).apply(testfunc, raw=False, **{'mult':2})
If i Try the above I receive an error
TypeError: apply() got an unexpected keyword argument 'mult'
it seems from the help page that this should be possible, but I can't find a working example