pypsa.Network.get_switchable_as_dense

pypsa.Network.get_switchable_as_dense#

Network.get_switchable_as_dense(component, attr, snapshots=None, inds=None)#

Return a Dataframe for a time-varying component attribute with values for all non-time-varying components filled in with the default values for the attribute.

Parameters:
  • network (pypsa.Network)

  • component (string) – Component object name, e.g. ‘Generator’ or ‘Link’

  • attr (string) – Attribute name

  • snapshots (pandas.Index) – Restrict to these snapshots rather than network.snapshots.

  • inds (pandas.Index) – Restrict to these components rather than network.components.index

Return type:

pandas.DataFrame

Examples

>>> get_switchable_as_dense(network, 'Generator', 'p_max_pu')