Problem when importing statsmodels.regression.rolling (AttributeError: 'pandas._libs.properties.CachedProperty' object has no attribute 'func')
I was getting the same error when I was trying to import statsmodels.tsa.arima_model that has been removed & replaced by statsmodels.tsa.arima.model.
The steps I followed to troubleshoot the error are:

Updating pandas using this command: pip install --upgrade pandas --user

Updating statsmodels using this command: pip install --upgrade statsmodels --user

After that I got the below error:
NotImplementedError:
statsmodels.tsa.arima_model.ARMA and statsmodels.tsa.arima_model.ARIMA have
been removed in favor of statsmodels.tsa.arima.model.ARIMA (note the .
between arima and model) and statsmodels.tsa.SARIMAX.
statsmodels.tsa.arima.model.ARIMA makes use of the statespace framework and
is both well tested and maintained. It also offers alternative specialized
parameter estimators.


Then I resolved the error by replacing statsmodels.tsa.arima_model with statsmodels.tsa.arima.model .
When I run the below code:
from statsmodels.regression import rolling
I get this error message:

AttributeError                            Traceback (most recent call last)
/var/folders/q9/_s10_9yx6k7gxt3w4t7j0hgw0000gn/T/ipykernel_56663/1581398632.py in 
----> 1 from statsmodels.regression import rolling
~/opt/anaconda3/lib/python3.8/site-packages/statsmodels/regression/rolling.py in 
456
457
--> 458 class RollingRegressionResults(object):
459     """
460     Results from rolling regressions
~/opt/anaconda3/lib/python3.8/site-packages/statsmodels/regression/rolling.py in RollingRegressionResults()
514
515     @cache_readonly
--> 516     @Appender(RegressionResults.aic.func.doc)
517     def aic(self):
518         return self._wrap(RegressionResults.aic.func(self))
AttributeError: 'pandas._libs.properties.CachedProperty' object has no attribute 'func'

I've never had this problem before and I'm unsure what has gone wrong. I'm running statsmodels version 0.12.2 and Python 3.8.12 on MacOS 11.4. I'm trying to use RollingOLS.
Thanks for your help.
EDIT:
Out of curiosity I just replaced all '.func' with '' in this file and this issue no longer exists and the results seem to be accurate. I don't really understand what this did however and since I'm using this in a professional capacity I need to be sure this is correct.