2017-08-08 1 views
6
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' 
+1

Was hinzugefügt worden ist Ihre Pandas Version? 'Rollen' wurde in Pandas 0.18.0 hinzugefügt – MaxU

Antwort

6

Wahrscheinlich Sie verwenden alte Pandas Version (< 0.18.0).

Series.rolling hat in Pandas 0.18.0

Verwandte Themen