Skip to content

Commit

Permalink
ensure egird columns are numeric to avoid `ZeroDivisionError: float d…
Browse files Browse the repository at this point in the history
…ivision by zero`
  • Loading branch information
bl-young committed Dec 17, 2023
1 parent dbe1c5d commit 2a08fbc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions stewi/egrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def generate_eGRID_files(year):
'ReliabilitySource',
'FlowAmount']))
).apply(pd.Series.explode).reset_index()
unit_egrid['FlowAmount'] = pd.to_numeric(unit_egrid['FlowAmount'])

dq_mapping = pd.read_csv(eGRID_DATA_DIR
.joinpath('eGRID_unit_level_reliability_scores.csv'))
Expand Down

0 comments on commit 2a08fbc

Please sign in to comment.