pypowsybl.network.Network.get_buses#
- Network.get_buses(all_attributes=False, attributes=None, **kwargs)[source]#
Get a dataframe of buses from the bus view.
- Parameters:
all_attributes (bool) – flag for including all attributes in the dataframe, default is false
attributes (List[str] | None) – attributes to include in the dataframe. The 2 parameters are mutually exclusive. If no parameter is specified, the dataframe will include the default attributes.
kwargs (_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) – the data to be selected, as named arguments.
- Returns:
A dataframe of buses from the bus view
- Return type:
Notes
The resulting dataframe, depending on the parameters, will include the following columns:
v_mag: Get the voltage magnitude of the bus (in kV)
v_angle: the voltage angle of the bus (in degree)
connected_component: The connected component to which the bus belongs
synchronous_component: The synchronous component to which the bus belongs
voltage_level_id: at which substation the bus is connected
This dataframe is indexed on the bus ID in the bus view.
See also
Examples
net = pp.network.create_four_substations_node_breaker_network() net.get_buses()
It outputs something like:
v_mag
v_angle
connected_component
synchronous_component
voltage_level_id
id
S1VL1_0
224.6139
2.2822
0
1
S1VL1
S1VL2_0
400.0000
0.0000
0
1
S1VL2
S2VL1_0
408.8470
0.7347
0
0
S2VL1
S3VL1_0
400.0000
0.0000
0
0
S3VL1
S4VL1_0
400.0000
-1.1259
0
0
S4VL1
net = pp.network.create_four_substations_node_breaker_network() net.get_buses(all_attributes=True)
It outputs something like:
v_mag
v_angle
connected_component
synchronous_component
voltage_level_id
id
S1VL1_0
224.6139
2.2822
0
1
S1VL1
S1VL2_0
400.0000
0.0000
0
1
S1VL2
S2VL1_0
408.8470
0.7347
0
0
S2VL1
S3VL1_0
400.0000
0.0000
0
0
S3VL1
S4VL1_0
400.0000
-1.1259
0
0
S4VL1
net = pp.network.create_four_substations_node_breaker_network() net.get_buses(attributes=['v_mag','v_angle','voltage_level_id'])
It outputs something like:
v_mag
v_angle
voltage_level_id
id
S1VL1_0
224.6139
2.2822
S1VL1
S1VL2_0
400.0000
0.0000
S1VL2
S2VL1_0
408.8470
0.7347
S2VL1
S3VL1_0
400.0000
0.0000
S3VL1
S4VL1_0
400.0000
-1.1259
S4VL1