match build_powerplants FuelType (closes #754)
This commit is contained in:
parent
9cc5be1c25
commit
d45cb71b7a
@ -98,13 +98,13 @@ def add_custom_powerplants(ppl, custom_powerplants, custom_ppl_query=False):
|
|||||||
|
|
||||||
|
|
||||||
def replace_natural_gas_technology(df):
|
def replace_natural_gas_technology(df):
|
||||||
mapping = {"Steam Turbine": "OCGT", "Combustion Engine": "OCGT"}
|
mapping = {"Steam Turbine": "CCGT", "Combustion Engine": "OCGT"}
|
||||||
tech = df.Technology.replace(mapping).fillna("OCGT")
|
tech = df.Technology.replace(mapping).fillna("CCGT")
|
||||||
return df.Technology.where(df.Fueltype != "Natural Gas", tech)
|
return df.Technology.mask(df.Fueltype == "Natural Gas", tech)
|
||||||
|
|
||||||
|
|
||||||
def replace_natural_gas_fueltype(df):
|
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__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user