diff --git a/src/egon/data/datasets/pypsaeursec/__init__.py b/src/egon/data/datasets/pypsaeursec/__init__.py index 9514aa064..95785fb61 100755 --- a/src/egon/data/datasets/pypsaeursec/__init__.py +++ b/src/egon/data/datasets/pypsaeursec/__init__.py @@ -555,7 +555,7 @@ def neighbor_reduction(): engine = db.engine() neighbors.loc[:, "scn_name"] = "eGon100RE" - neighbors.index = neighbors["new_index"] + neighbors.index = neighbors.loc[:, "new_index"] # Correct geometry for non AC buses carriers = set(neighbors.carrier.to_list()) @@ -610,10 +610,10 @@ def neighbor_reduction(): # prepare and write neighboring crossborder lines to etrago tables def lines_to_etrago(neighbor_lines=neighbor_lines, scn="eGon100RE"): neighbor_lines.loc[:, "scn_name"] = scn - neighbor_lines.loc[:, "cables"] = 3 * neighbor_lines[ - "num_parallel" + neighbor_lines.loc[:, "cables"] = 3 * neighbor_lines.loc[ + :, "num_parallel" ].astype(int) - neighbor_lines.loc[:, "s_nom"] = neighbor_lines["s_nom_min"] + neighbor_lines.loc[:, "s_nom"] = neighbor_lines.loc[:, "s_nom_min"] for i in [ "name", @@ -809,7 +809,7 @@ def links_to_etrago(neighbor_links, scn="eGon100RE", extendable=True): # prepare neighboring generators for etrago tables neighbor_gens.loc[:, "scn_name"] = "eGon100RE" - neighbor_gens.loc[:, "p_nom"] = neighbor_gens["p_nom_opt"] + neighbor_gens.loc[:, "p_nom"] = neighbor_gens.loc[:, "p_nom_opt"] neighbor_gens.loc[:, "p_nom_extendable"] = False # Unify carrier names