Skip to content

Commit c1a8bcc

Browse files
committed
fix some future warnings
1 parent be7e6e8 commit c1a8bcc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/compile_cost_assumptions.py

+2
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ def get_data_DEA(tech, data_in, expectation=None):
362362

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

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

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

0 commit comments

Comments
 (0)