Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AttributeError: 'Series' object has no attribute 'rolling'

Tags:

python

pandas

Traceback (most recent call last):
  File "mov_avg.py", line 9, in <module>
    data_frame['100ma']= data_frame['Adj Close'].rolling(window=100, min_periods=0).mean()
  File "/usr/lib/python3/dist-packages/pandas/core/generic.py", line 2360, in __getattr__
    (type(self).__name__, name))
AttributeError: 'Series' object has no attribute 'rolling'
like image 201
user3165247 Avatar asked Aug 08 '17 12:08

user3165247


1 Answers

Most probably you are using old Pandas version (< 0.18.0).

Series.rolling has been added in Pandas 0.18.0

like image 71
MaxU - stop WAR against UA Avatar answered Nov 08 '22 01:11

MaxU - stop WAR against UA