Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -453,8 +453,8 @@ def process_aggregation(locations_df, start_date_str, end_date_str, dataset_id,
|
|
453 |
if shape_type.lower() == 'point':
|
454 |
agg_dict[original_lat_col] = 'first'
|
455 |
agg_dict[original_lon_col] = 'first'
|
456 |
-
aggregated_output['Date Range'] = aggregated_output['Start Date'] + " to " + aggregated_output['End Date']
|
457 |
aggregated_output = result_df.groupby('Location Name').agg(agg_dict).reset_index()
|
|
|
458 |
aggregated_output.rename(columns={'Calculated Value': 'Aggregated Value'}, inplace=True)
|
459 |
return aggregated_output.to_dict(orient='records'), processing_time
|
460 |
else:
|
|
|
453 |
if shape_type.lower() == 'point':
|
454 |
agg_dict[original_lat_col] = 'first'
|
455 |
agg_dict[original_lon_col] = 'first'
|
|
|
456 |
aggregated_output = result_df.groupby('Location Name').agg(agg_dict).reset_index()
|
457 |
+
aggregated_output['Date Range'] = aggregated_output['Start Date'] + " to " + aggregated_output['End Date']
|
458 |
aggregated_output.rename(columns={'Calculated Value': 'Aggregated Value'}, inplace=True)
|
459 |
return aggregated_output.to_dict(orient='records'), processing_time
|
460 |
else:
|