Open Xiaoshu-Zhao opened 1 year ago
This is also the reason why the plot
function with anomaly_tag="span"
(the default value) produces AttributeError: 'Series' object has no attribute 'iteritems'
(because: anomaly=anomalies : pd.Series
).
For example, the plot
line here would now produce an error: https://adtk.readthedocs.io/en/stable/notebooks/demo.html#PersistAD
s = pd.read_csv('./data/price_short.csv', index_col="Time", parse_dates=True, squeeze=True)
s = validate_series(s)
from adtk.detector import PersistAD
persist_ad = PersistAD(c=3.0, side='positive')
anomalies = persist_ad.fit_detect(s)
plot(s, anomaly=anomalies, ts_linewidth=1, ts_markersize=3, anomaly_color='red');
This is also the reason why the
plot
function withanomaly_tag="span"
(the default value) producesAttributeError: 'Series' object has no attribute 'iteritems'
(because:
anomaly=anomalies : pd.Series
).For example, the
plot
line here would now produce an error: https://adtk.readthedocs.io/en/stable/notebooks/demo.html#PersistAD
How do I fix this issue, the error is indicating in _plot_anomaly function in _visualization.py
pandas removed deprecated
Series.iteritems()
,DataFrame.iteritems()
but in_data.py
you still usediteritems
. For example, in line 164for t, v in time_window_end_series.iteritems():
please change it toitems