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, )