From b0b546bd2a7a4863b8a76b696265d82a7480e427 Mon Sep 17 00:00:00 2001 From: "Dawn M. Foster" Date: Mon, 4 Dec 2023 15:06:51 +0000 Subject: [PATCH] I was accessing a sorted dataframe by index, but I forgot to reindex it, which was resulting in unexpected results in the trend for first response in the graph. --- metrics/first_response.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metrics/first_response.py b/metrics/first_response.py index b50d19d..548c3cf 100644 --- a/metrics/first_response.py +++ b/metrics/first_response.py @@ -156,7 +156,7 @@ def response_time_data(repo_id, repo_name, org_name, start_date, end_date, engin start_mo += relativedelta(months=1) - first_response = first_response.sort_values('yearmonth') + first_response = first_response.sort_values('yearmonth').reset_index(drop=True) month_num = 0 six_months = str(datetime.date.today() + relativedelta(months=-7)) # 7 because we don't gather current partial month data