Skip to content

Commit

Permalink
Avoid building name concatenation when resampling
Browse files Browse the repository at this point in the history
  • Loading branch information
reyery committed Oct 15, 2023
1 parent 6aa0a0d commit 8a27a7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cea/plots/demand/energy_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def calc_monthly_energy_balance(data_frame, normalize_value):

# convert to monthly
data_frame.index = pd.to_datetime(data_frame.index)
data_frame_month = data_frame.resample("M").sum() # still kWh
data_frame_month = data_frame.resample("M").sum(numeric_only=True) # still kWh
data_frame_month["month"] = data_frame_month.index.strftime("%B")
data_frame_month.set_index("month", inplace=True)

Expand Down

0 comments on commit 8a27a7a

Please sign in to comment.