From 5a2ac8d2d004c63f24fe432ddee8355a1c7617ab Mon Sep 17 00:00:00 2001 From: NicholasTurner23 Date: Fri, 13 Dec 2024 15:53:14 +0300 Subject: [PATCH] Just some cleanup --- src/analytics/api/views/data.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/analytics/api/views/data.py b/src/analytics/api/views/data.py index 07ef72c0a2..9f60eef88e 100644 --- a/src/analytics/api/views/data.py +++ b/src/analytics/api/views/data.py @@ -163,11 +163,14 @@ def post(self): ) if minimum_output: # Drop unnecessary columns + columns_to_drop = ["site_id"] + columns_to_drop.append("timestamp") if frequency in [ + "hourly", + "daily", + ] else columns_to_drop + print(data_frame.columns.to_list()) data_frame.drop( - columns=[ - "site_id", - "timestamp", - ], + columns=columns_to_drop, inplace=True, )