Skip to content

Commit

Permalink
Fix pandas warning
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterbles committed Jan 29, 2024
1 parent b2cdf36 commit 3964ccd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pyaugmecon/pyaugmecon.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,13 @@ def _output_excel(self):
writer = pd.ExcelWriter(f"{self.logs.logdir}{self.opts.log_name}.xlsx")

# Write the data to the sheets in the Excel file
pd.DataFrame(self.model.e).to_excel(writer, "e_points")
pd.DataFrame(self.model.payoff).to_excel(writer, "payoff_table")
pd.DataFrame(Helper.keys_to_list(self.sols)).to_excel(writer, "sols")
pd.DataFrame(Helper.keys_to_list(self.unique_sols)).to_excel(writer, "unique_sols")
pd.DataFrame(Helper.keys_to_list(self.unique_pareto_sols)).to_excel(writer, "unique_pareto_sols")
pd.DataFrame(self.model.e).to_excel(excel_writer=writer, sheet_name="e_points")
pd.DataFrame(self.model.payoff).to_excel(excel_writer=writer, sheet_name="payoff_table")
pd.DataFrame(Helper.keys_to_list(self.sols)).to_excel(excel_writer=writer, sheet_name="sols")
pd.DataFrame(Helper.keys_to_list(self.unique_sols)).to_excel(excel_writer=writer, sheet_name="unique_sols")
pd.DataFrame(Helper.keys_to_list(self.unique_pareto_sols)).to_excel(
excel_writer=writer, sheet_name="unique_pareto_sols"
)

# Close the Excel writer object
writer.close()
Expand Down

0 comments on commit 3964ccd

Please sign in to comment.