Fix bug preventing inclusion of custom_powerplants (#732)

This commit is contained in:
euronion 2023-09-05 17:21:11 +02:00 committed by GitHub
parent 624d240dea
commit 02bffdbd06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -20,6 +20,11 @@ Upcoming Release
* Files extracted from sector-coupled data bundle have been moved from ``data/`` to ``data/sector-bundle``.
**Bugs and Compatibility**
* A bug preventing custom powerplants specified in ``data/custom_powerplants.csv`` was fixed. (https://github.com/PyPSA/pypsa-eur/pull/732)
PyPSA-Eur 0.8.1 (27th July 2023)
================================

View File

@ -89,7 +89,7 @@ logger = logging.getLogger(__name__)
def add_custom_powerplants(ppl, custom_powerplants, custom_ppl_query=False):
if not custom_ppl_query:
return ppl
add_ppls = pd.read_csv(custom_powerplants, index_col=0, dtype={"bus": "str"})
add_ppls = pd.read_csv(custom_powerplants, dtype={"bus": "str"})
if isinstance(custom_ppl_query, str):
add_ppls.query(custom_ppl_query, inplace=True)
return pd.concat(