Make a copy of df when removing fuel scenario name
@@ -128,12 +128,12 @@ def update_dictionary(d, u):
def remove_fuel_scenario_name(df, settings):
-
+ _df = df.copy()
scenarios = settings["eia_series_scenario_names"].keys()
for s in scenarios:
- df["Fuel"] = df["Fuel"].str.replace(f"_{s}", "")
+ _df["Fuel"] = _df["Fuel"].str.replace(f"_{s}", "")
- return df
+ return _df
def write_results_file(df, folder, file_name, include_index=False):
