we could use a better error message rather than `AttributeError` e.g. https://github.com/pandas-dev/pandas/pull/38804#discussion_r550196167 when using `df.rolling(...).apply(f, raw=True)` when `f` is using non-numpy functions e.g. `.iloc`