Skip to content

Commit

Permalink
Adjust selecting maximum index for string indices
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaraBuettner committed Aug 4, 2023
1 parent 580c33e commit 548ad18
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions etrago/tools/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,13 +612,10 @@ def load_shedding(self, temporal_disaggregation=False, **kwargs):
network.add("Carrier", "load")
start = (
network.generators.index.to_series()
.str.rsplit(" ")
.str[0]
.astype(int)
.sort_values()
.str.extract('(\d+)').astype(int)
.max()
+ 1
)
)[0]

if start != start:
start = 0
Expand Down

0 comments on commit 548ad18

Please sign in to comment.