pypsa.statistics.grouping.Groupers.country

pypsa.statistics.grouping.Groupers.country#

Groupers.country(n: Network, c: str, port: str = '') pd.Series#

Grouper method to group by the country of the components corresponding bus.

Parameters:
  • n (Network) – PyPSA network instance.

  • c (str) – Components type name. E.g. “Generator”, “StorageUnit”, etc.

  • port (str, optional) – Port of corresponding bus, which should be used.

Returns:

Series with the country of the components corresponding bus.

Return type:

pd.Series