diff --git a/scripts/build_powerplants.py b/scripts/build_powerplants.py index f25f111b..cefc0ee5 100755 --- a/scripts/build_powerplants.py +++ b/scripts/build_powerplants.py @@ -98,13 +98,13 @@ def add_custom_powerplants(ppl, custom_powerplants, custom_ppl_query=False): def replace_natural_gas_technology(df): - mapping = {"Steam Turbine": "OCGT", "Combustion Engine": "OCGT"} - tech = df.Technology.replace(mapping).fillna("OCGT") - return df.Technology.where(df.Fueltype != "Natural Gas", tech) + mapping = {"Steam Turbine": "CCGT", "Combustion Engine": "OCGT"} + tech = df.Technology.replace(mapping).fillna("CCGT") + return df.Technology.mask(df.Fueltype == "Natural Gas", tech) def replace_natural_gas_fueltype(df): - return df.Fueltype.where(df.Fueltype != "Natural Gas", df.Technology) + return df.Fueltype.mask(df.Technology == "OCGT" | df.Technology == "CCGT", "Natural Gas") if __name__ == "__main__":