Skip to content

Commit

Permalink
Black reformating
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Jul 29, 2024
1 parent aab8bd8 commit 7ec912b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pathways/pathways.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,8 @@ def run_gsa(self, method: str = "delta") -> None:

try:
df_technology_shares = pd.read_excel(
export_path, sheet_name="Technology shares",
export_path,
sheet_name="Technology shares",
)
except:
df_technology_shares = None
Expand All @@ -656,14 +657,18 @@ def run_gsa(self, method: str = "delta") -> None:
)

# open Excel workbook
with pd.ExcelWriter(export_path, engine="openpyxl", mode="a") as writer:
with pd.ExcelWriter(
export_path, engine="openpyxl", mode="a"
) as writer:

df_GSA_results = run_GSA_delta(
total_impacts=df_sum_impacts,
uncertainty_values=df_mc_vals,
technology_shares=df_technology_shares,
)

df_GSA_results.to_excel(writer, sheet_name=f"GSA {method.capitalize()}", index=False)
df_GSA_results.to_excel(
writer, sheet_name=f"GSA {method.capitalize()}", index=False
)

print(f"GSA results added to: {export_path.resolve()}")

0 comments on commit 7ec912b

Please sign in to comment.