Skip to content

Commit 103c285

Browse files
committed
fix: typing of get_hourly_demand
1 parent 592b272 commit 103c285

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pownet/core/output.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,12 @@ def get_monthly_generation(self, node_variables: pd.DataFrame) -> pd.DataFrame:
128128
monthly_generation.index.name = "Month"
129129
return monthly_generation
130130

131-
def get_hourly_demand(self, input_demand: pd.DataFrame) -> pd.DataFrame:
131+
def get_hourly_demand(self, input_demand: pd.DataFrame) -> pd.Series:
132132
# Demand is an input to the simulation
133133
hourly_demand = input_demand.sum(axis=1).to_frame()
134134
hourly_demand.columns = ["demand"]
135135
hourly_demand.index.name = "Hour"
136+
hourly_demand = hourly_demand.squeeze(axis=1)
136137
return hourly_demand
137138

138139
def get_daily_demand(self, input_demand: pd.DataFrame) -> pd.Series:

0 commit comments

Comments
 (0)