diff --git a/etrago/tools/utilities.py b/etrago/tools/utilities.py index dc66d232..ebc858f1 100755 --- a/etrago/tools/utilities.py +++ b/etrago/tools/utilities.py @@ -127,8 +127,16 @@ def buses_grid_linked(network, voltage_level): mask = ( network.buses.index.isin(network.lines.bus0) | (network.buses.index.isin(network.lines.bus1)) - | (network.buses.index.isin(network.links.loc[network.links.carrier=="DC", "bus0"])) - | (network.buses.index.isin(network.links.loc[network.links.carrier=="DC", "bus1"])) + | ( + network.buses.index.isin( + network.links.loc[network.links.carrier == "DC", "bus0"] + ) + ) + | ( + network.buses.index.isin( + network.links.loc[network.links.carrier == "DC", "bus1"] + ) + ) ) & (network.buses.v_nom.isin(voltage_level)) df = network.buses[mask]