Skip to content

Commit

Permalink
fix some future warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lisazeyen committed Feb 15, 2024
1 parent be7e6e8 commit c1a8bcc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/compile_cost_assumptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ def get_data_DEA(tech, data_in, expectation=None):

# replace missing data
df.replace("-", np.nan, inplace=True)
df = df.infer_objects()
# average data in format "lower_value-upper_value"
df = df.apply(lambda row: row.apply(lambda x: (float(x.split("-")[0])
+ float(x.split("-")[1]))
Expand Down Expand Up @@ -447,6 +448,7 @@ def get_data_DEA(tech, data_in, expectation=None):

# if year-specific data is missing and not fixed by interpolation fill forward with same values
df_final = df_final.ffill(axis=1)
df_final = df_final.infer_objects()

df_final["source"] = source_dict["DEA"] + ", " + excel_file.replace("inputs/","")
if tech in new_format and (tech!="electrolysis"):
Expand Down

0 comments on commit c1a8bcc

Please sign in to comment.