From 88835b7dcba72981f65217ebdd2b25cfb634fc4b Mon Sep 17 00:00:00 2001 From: Ge Yang Date: Wed, 28 Sep 2022 16:22:17 -0400 Subject: [PATCH] fix the None.index error --- dash_server_specs/test_ml_dash.py | 2 +- ml_dash/schema/files/series.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dash_server_specs/test_ml_dash.py b/dash_server_specs/test_ml_dash.py index d26644d..bb28cf0 100644 --- a/dash_server_specs/test_ml_dash.py +++ b/dash_server_specs/test_ml_dash.py @@ -300,7 +300,7 @@ def test_series_x_limit(log_dir): metricsFiles: $metricsFiles, prefix: $prefix, k: 10, - xLow: 100, + xLow: 41, xKey: $xKey, yKey: $yKey, yKeys: $yKeys diff --git a/ml_dash/schema/files/series.py b/ml_dash/schema/files/series.py index 481f39b..39aaf8e 100644 --- a/ml_dash/schema/files/series.py +++ b/ml_dash/schema/files/series.py @@ -155,8 +155,6 @@ def get_series(metrics_files=tuple(), dataframes = [] for df in dfs: if df is None: - df['index'] = df.index - df.set_index('index') continue elif x_key is not None: df.set_index(x_key) @@ -181,10 +179,10 @@ def get_series(metrics_files=tuple(), inds = True if x_low is not None: inds &= df[x_key or "index"] >= x_low - print("x_low >>>", inds) + # print("x_low >>>", inds) if x_high is not None: inds &= df[x_key or "index"] <= x_high - print("x_high >>>", inds) + # print("x_high >>>", inds) if inds is not True: df = df.loc[inds]