Skip to content

Commit

Permalink
Merge pull request #4492 from NicholasTurner23/update/calculate_hourl…
Browse files Browse the repository at this point in the history
…y_airqualitydata_using_bigqdata

Update/calculate hourly airqualitydata using bigqdata
  • Loading branch information
Baalmart authored Feb 25, 2025
2 parents d8111a1 + 99e8f1b commit 58e2cd3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/workflows/airqo_etl_utils/airqo_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,11 @@ def calibrate_data(data: pd.DataFrame, groupby: str) -> pd.DataFrame:

for groupedby, group in grouped_df:
# If the below condition fails, the rf_model and lasso_model default to the previously ones used and the ones set as "default" outside the forloop.
if not np.isnan(groupedby) and groupedby.lower() in available_models:
if (
groupedby
and not pd.isna(groupedby)
and groupedby.lower() in available_models
):
try:
current_rf_model = GCSUtils.get_trained_model_from_gcs(
project_name=project_id,
Expand Down

0 comments on commit 58e2cd3

Please sign in to comment.