|
|
@ -52,10 +52,9 @@ class DataProvider: |
|
|
|
return result |
|
|
|
return result |
|
|
|
dataframe = self.get_dataframe(None) |
|
|
|
dataframe = self.get_dataframe(None) |
|
|
|
for anomaly in anomalies: |
|
|
|
for anomaly in anomalies: |
|
|
|
start_time = pd.to_datetime(anomaly['start'] + 1, unit='ms') |
|
|
|
start_time = pd.to_datetime(anomaly['start'] - 1, unit='ms') |
|
|
|
finish_time = pd.to_datetime(anomaly['finish'] - 1, unit='ms') |
|
|
|
finish_time = pd.to_datetime(anomaly['finish'] + 1, unit='ms') |
|
|
|
current_index = (dataframe['timestamp'] >= start_time) & ( |
|
|
|
current_index = (dataframe['timestamp'] >= start_time) & (dataframe['timestamp'] <= finish_time) |
|
|
|
dataframe['timestamp'] <= finish_time) |
|
|
|
|
|
|
|
anomaly_frame = dataframe[current_index] |
|
|
|
anomaly_frame = dataframe[current_index] |
|
|
|
if anomaly_frame.empty: |
|
|
|
if anomaly_frame.empty: |
|
|
|
continue |
|
|
|
continue |
|
|
|