pypsa.Network.remove

Contents

pypsa.Network.remove#

Network.remove(class_name: str, name: str | int | Sequence[int | str], suffix: str = '') None#

Removes a single component or a list of components from the network.

Removes it from component DataFrames.

Parameters:
  • class_name (str) – Component class name

  • name (str, int, list-like or pandas.Index) – Component name(s)

  • suffix (str, default '')

Examples

>>> n.remove("Line", "my_line 12345")
>>> n.remove("Line", ["line x", "line y"])