diff --git a/gspconsumer/app.py b/gspconsumer/app.py index f9057c5..a712f60 100644 --- a/gspconsumer/app.py +++ b/gspconsumer/app.py @@ -194,6 +194,9 @@ def pull_data_and_save( else: logger.debug(f"This is the first lot gsp yield data for GSP {(gsp.gsp_id)}") + # drop any nan values in generation_mw column + gsp_yield_df = gsp_yield_df.dropna(subset=["generation_mw"]) + # need columns datetime_utc, solar_generation_kw gsp_yield_df["solar_generation_kw"] = 1000 * gsp_yield_df["generation_mw"] gsp_yield_df["datetime_utc"] = gsp_yield_df["datetime_gmt"] diff --git a/requirements.txt b/requirements.txt index 53c8d7d..11d49ae 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ numpy +pydantic<2.0 pandas pyyaml urllib3