From 3dbd8d1492b164f3f2f4c126e63cf35837af007a Mon Sep 17 00:00:00 2001 From: Fabian Date: Fri, 24 Jun 2022 18:31:39 +0200 Subject: [PATCH] add_electricity: fix read_csv --- scripts/add_electricity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/add_electricity.py b/scripts/add_electricity.py index f2dfdfef..9a99d314 100755 --- a/scripts/add_electricity.py +++ b/scripts/add_electricity.py @@ -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)