add_electricity: fix read_csv

This commit is contained in:
Fabian 2022-06-24 18:31:39 +02:00
parent 17d7403f20
commit 3dbd8d1492

View File

@ -337,7 +337,7 @@ def attach_conventional_generators(n, costs, ppl, conventional_carriers, extenda
# Single value affecting all generators of technology k indiscriminantely of country
n.generators.loc[idx, "p_max_pu"] = factors
elif isinstance(factors, str):
factors = pd.read_file(factors, index_col=0)
factors = pd.read_csv(factors, index_col=0)['factor']
# Values affecting generators of technology k country-specific
# First map generator buses to countries; then map countries to p_max_pu
bus_factors = n.buses.country.map(factors)