let's say i have multiple dataframe df1, df2,...,df100 and I have function as written below. I don't know how to apply the function to multiple (a hundred df) in shorter way. any suggestion? many thanks,
def sma(x,length):
ma = x.rolling(window=length,min_periods=1).mean()
return (x / ma) -1
sma(df1, 40)