Skip to content

Commit

Permalink
Merge pull request #3402 from architecture-building-systems/3341-remo…
Browse files Browse the repository at this point in the history
…ving-nan-total-energy-demand

Update demand_writers to remove nan values.py
  • Loading branch information
ShiZhongming committed Oct 13, 2023
2 parents d59d224 + c15a8b3 commit a59ab5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cea/demand/demand_writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def results_to_csv(self, tsd, bpr, locator, date, building_name):
def calc_yearly_dataframe(self, bpr, building_name, tsd):
# if printing total values is necessary
# treating timeseries data from W to MWh
data = dict((x + '_MWhyr', tsd[x].sum() / 1000000) for x in self.load_vars)
data.update(dict((x + '0_kW', tsd[x].max() / 1000) for x in self.load_vars))
data = dict((x + '_MWhyr', np.nan_to_num(tsd[x]).sum() / 1000000) for x in self.load_vars)
data.update(dict((x + '0_kW', np.nan_to_num(tsd[x]) .max() / 1000) for x in self.load_vars))
# get order of columns
keys = data.keys()
columns = self.OTHER_VARS
Expand Down

0 comments on commit a59ab5c

Please sign in to comment.