Skip to content

Commit

Permalink
drop nans if in generation_mw
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Sep 5, 2023
1 parent 880ee11 commit 9869814
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gspconsumer/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 9869814

Please sign in to comment.