pypsa.Network.merge#
- Network.merge(other: Network, components_to_skip: Collection[str] | None = None, inplace: bool = False, with_time: bool = True) Network | None #
Merge the components of two networks.
Requires disjunct sets of component indices and, if time-dependent data is merged, identical snapshots and snapshot weightings.
If a component in
other
does not have values for attributes present inn
, default values are set.If a component in
other
has attributes which are not present inn
these attributes are ignored.- Parameters:
n (pypsa.Network) – Network to add to.
other (pypsa.Network) – Network to add from.
components_to_skip (list-like, default None) – List of names of components which are not to be merged e.g. “Bus”
inplace (bool, default False) – If True, merge into
n
in-place, otherwise a copy is made.with_time (bool, default True) – If False, only static data is merged.
- Returns:
receiving_n – Merged network, or None if inplace=True
- Return type: